[Trigger] TD Lives trigger

Status
Not open for further replies.
  • Livez
    • Events
      • Unit - A unit enters <your region>
    • Conditions
      • Owner of (Triggering unit) equal to <creep player>
    • Actions
      • Set Lives = Lives - 1
After that, check if the lives are 0 and defeat the human players.
 
Well maybe something like this?It's a trigger i use for my TD
  • END
    • Events
      • Unit - A unit enters END <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to Player 12 (Brown)
    • Actions
      • Sound - Play PurgeTarget <gen>
      • Unit - Kill (Entering unit)
      • Leaderboard - Change the value for Player 12 (Brown) in LEADERBOARD to Chances
      • Set Chances = (Chances - 1)
      • Game - Display to (All players) the text: (|c00FF0000Warning!|r + ((String(Chances)) + |c00FF0000Chances left!|r))
Chances is a integer variable.And...sound and leaderboard aren't nessecary,i just use them.You can remove them.
 
Actions
Sound - Play PurgeTarget <gen>
Unit - Kill (Entering unit)
Leaderboard - Change the value for Player 12 (Brown) in LEADERBOARD to Chances
Set Chances = (Chances - 1)
Game - Display to (All players) the text: (|c00FF0000Warning!|r + ((String(Chances)) + |c00FF0000Chances left!|r))
[/TRIGGER]

Firt set chances = chances -1, then the leaderboard value.
 
Status
Not open for further replies.
Back
Top