- Joined
- May 4, 2007
- Messages
- 52
Hello again!
Now i got another problem i hope u can help me whit ^^
I have created a player-group with variables, when a players unit dies (the runner) the owner of the unit is added to the player group so that when someone comes and enters a region all players that are in the group gets a new runner (rescuing..) but how can i after that make the player group empty so that u dont get more heros if someone rescues if u even aren't dead?
i send an code..
after the "Unit - Create 1 Runner for (Picked player) at (Random point in Start <gen>) " i would like something that makes the group empty again thankful for answers..
Now i got another problem i hope u can help me whit ^^
I have created a player-group with variables, when a players unit dies (the runner) the owner of the unit is added to the player group so that when someone comes and enters a region all players that are in the group gets a new runner (rescuing..) but how can i after that make the player group empty so that u dont get more heros if someone rescues if u even aren't dead?
i send an code..
Code:
Rescue
Events
Unit - A unit enters Make Kodo Move <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Runner
Actions
Player - Add Gold_Award to (Owner of (Entering unit)) Current gold
Set Gold_Award = 0
Unit Group - Pick every unit in (Units in Make Kodo Move <gen>) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Flag
Then - Actions
Unit - Move (Picked unit) instantly to (Random point in Start <gen>)
Player Group - Pick every player in Flag_Group and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Unit - Create 1 Runner for (Picked player) at (Random point in Start <gen>) facing Default building facing degrees
Else - Actions
Do nothing
after the "Unit - Create 1 Runner for (Picked player) at (Random point in Start <gen>) " i would like something that makes the group empty again thankful for answers..