Hero Trigger (For RPG's)
Here is a trigger that i use for heroes. Fist tirgger is slecting a hero from a slection box. (like the one in RP's)Take note that there are triggers that must be made before you set up the triggers. So here it is.
PLAYERS:
Player 1
CONDITIONS:
Current Player brings exactly 1 Civillian to 'Tyranid Harliquin'.
ACTIONS:
Create 1 Tyranid Harliquin at P1 for Current player.
Kill All Civillian for Current Player at Heroes Box.
((switchstatus))Set Tyranid Harliquin 1.
Preserve Trigger.
Ok so the reason why the switch Tyranid Harliquin 1 has a 1 at the end is beacuse if more than one player is going th use that Hero, they wont be working off the same switch. If they both used the same switch, the game would be messed up and everyone would start dying and chaos would break out. So thats why you need seperate switches.
Ok I accidentally hit enter and posted the first part. The first part was only the spawning part. The second part is having a location on the hero so you can have bags and spells and stuff to stay with him/her at all times. Its really simple. Here it is.
PLYERS:
Player 1
CONDITIONS:
((switchstatus))Tyranid Harliquin is Set.
ACTIONS:
Center Location labled P1 on Tyranid Harliquin owned by current Player at Anywhere.
Center Location labled P1 on Tyranid Harliquin owned by current Player at Anywhere.
Center Location labled P1 on Tyranid Harliquin owned by current Player at Anywhere.
Center Location labled P1 on Tyranid Harliquin owned by current Player at Anywhere.
Center Location labled P1 on Tyranid Harliquin owned by current Player at Anywhere.
Preserve Trigger.
Its repetative because starcraft only repeats a trigger every 500 milliseconds. Adding numerous amounts of the same action will have it repeat even faster.
So now that we have the location centering on that player, you can have the player walk up to someone and talk to them, even if they dont have a location around them.
Lets give our heroes "hands" now shal we? These "Hands" allow you to pick up objects in one spot, them move them to another. You will need an SCV, Drone, or Probe to do this. You also need objects they can handel such as a Psi Emitter or a Data Disc. In this trigger I took a drone and called it
HANDS. You will also need a spot in where your "Hands" will move around in. (nicknamed "pockets") I made a small square with a path to a smaller square.
The location in the small square is called 'P1 Pockets'. The location in the smaller square is called 'Hands'. Here's the trigger.
PLAYERS:
Player 1
CONDITIONS:
Player 8 brings at least 1 Heat Pack to P1.
Move All Heat Pack owned by Player 8 from Anywhere to Pockets.
Preserve Trigger.
Ok so that gets the item INTO your "pocket". Heres how we take it out. Get your "Hands" to pick up the object. Use your hands to move the object.Here is the use trigger.
PLAYERS:
Player 1
CONDITIONS:
Player 8 brings at lest 1 Heat Pack to Hands.
(now here i can do 2 things. Number 1)
move all Heat Pack owned by Player 8 at Hands to P1
Preserve trigger
(or number 2)
Remove all Heat Pack owned by player 8
Create 5 Warmth for Current Player at Heat.
Preserve Trigger.
Ok so thats how you use your "hands". So what happens if you die? Well you can choose your player you respawn as. Its a little more complicated than you think though. Here it is.
PLAYERS:
Player 1
CONDITIONS:
Current Player commands at most 0 Tyranid Harliquin
((switch status)) Tyranid Harliquin 1 is Set
ACTIONS:
Clear Tyranid Harliquin 1
Center View for current player at Heroes
Create 1 Civillian for Current Player at Heroes Spawn
Center location labled P1 on Enter/Exit owned by all players at Respawn.
Preserve Trigger.
This way you wont start respawning with theother players running around and you are still alive.
There you have it. The basic triggers for a good user select RPG. I hope this worked for you.