Im making an rpg and when someone leaves i want all there units to die so someone else can be tere hero. (one person per hero :-/)
I cant figure out how to do this if this is possable.
Player 12 triggers, I don't have a link to them just go to
www.campaigncreations.org
it's some where in the starcraft section there.
CRITERIA:
-Switch 1 "ONE"
-Hero
NOTE: When you get Player 12 triggers and _ means Player 12
TRIGGER CONDITIONS:
- _ commands at least 1 "Hero"
- Set "ONE"
TRIGGER ACTIONS:
- Preserve Trigger
TRIGGER CONDITIONS:
- "ONE" is set
TRIGGER ACTIONS:
- Give all "Hero" to "Player #"
hope this helps
Or an easier way:
CONDITIONS:
Always
ACTIONS:
Give all unit owned by player _ to player 1
Preserve Trigger
QUOTE(FireFly @ Jan 20 2004, 01:16 AM)
Player 12 triggers, I don't have a link to them just go to
www.campaigncreations.org
it's some where in the starcraft section there.
Go get them here
here *coughcough* lol
Guys, he wants to kill the units. The idea trigger would be...
Conditions:
Player 12 commands at least 1 heroUnit.
Actions:
Kill all heroUnit for Player 12.
Preserve Trigger.
There is more than one way to get the player 12. You can either download the P12 triggers Yoshi linked you to, or you can save the triggers to a .txt file with GUEdit and change it from "Neutral Players" or whatever you set it to previously and type in "Player 12". It works in the same exact way as the P12 triggers. You would then load them back using GUEdit.
I think this trigger also might work...
Conditions:
All players commands at least 1 heroUnit.
Force 1 commands exactly 0 heroUnit. (Force 1 being the players)
Actions:
Kill all heroUnit for all players.
Preserve Trigger.
But ONLY IF that's the only unit on the map.
He only said he wants it to die so someone else can get the hero, so just give someone else the hero.
And perhaps teleport it to the beginning.
If you give the hero to a player you restrict the player. Say he didn't want that hero and wanted a different one? Now he can't choose.
I think the best option is to have the Unit moved to a holding spot and the player decide to either take it or ignore it and let it die. If someone chooses it they get it; and if no one wants it then it dies. With a Yes/No system it is easy.
I don't know how that's any easier than killing the unit and allowing another player to choose it from a spot on the map designated for choosing heros (which was probably there to begin with because players have to choose heros at the start).