HG-Bonfire
New Member
- Reaction score
- 22
Ive got a trigger that makes it so every 30 seconds, if a unit doesnt have a certain number of coins (the coin is recreated as an item) then they die
the problem is that after the 30 seconds, it isnt killing the units without the right number of coins, anybody know why?
Code:
Coin Collection Countdown
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Trigger - Turn off (This trigger)
For each (Integer A) from 1 to 1, do (Actions)
Loop - Actions
Countdown Timer - Start Countdown as a Repeating timer that will expire in 30.00 seconds
Countdown Timer - Destroy Countdown_Window
Countdown Timer - Create a timer window for (Last started timer) with title ((You need + (String((Integer A)))) + coin!)
Set Countdown_Window = (Last created timer window)
Wait 29.00 seconds
Unit Group - Pick every unit in (Units in Region 007 <gen> matching (Numof_Coins[(Player number of (Owner of (Matching unit)))] Less than (Integer A))) and do (Unit - Kill (Picked unit))
For each (Integer A) from 2 to 6, do (Actions)
Loop - Actions
Countdown Timer - Start Countdown as a Repeating timer that will expire in 30.00 seconds
Countdown Timer - Destroy Countdown_Window
Countdown Timer - Create a timer window for (Last started timer) with title ((You need + (String((Integer A)))) + coins!)
Set Countdown_Window = (Last created timer window)
Wait 29.00 seconds
Unit Group - Pick every unit in (Units in Region 007 <gen> matching (Numof_Coins[(Player number of (Owner of (Matching unit)))] Less than (Integer A))) and do (Unit - Kill (Picked unit))
the problem is that after the 30 seconds, it isnt killing the units without the right number of coins, anybody know why?