- Joined
- Apr 15, 2008
- Messages
- 82
When a unit enters a region, it is suppsoed to explode and make the player lose a life. This works fine, other than the fact that the lives go from 30 to 28 when you lose your first life. I don't know what is wrong, but here is the trigger. I will link the map later, if needed.
Events
Unit - A unit enters CreepPath2Red <gen>
Conditions
(Owner of (Entering unit)) Equal to Player 9 (Gray)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
lives[1] Greater than 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has lost a life! )
Set lives[1] = (lives[1] - 1)
Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to (lives[1] - 1)
Unit - Explode (Entering unit)
Else - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has been defeated. Please give him plenty of trouble for dying.)
Set dead[1] = 1