hey there,
this spell is supposed to display a timer (3 min) and when the timer runs out it kills all town hall type units. if the casting hero is killed first the timer is canceled.
I'm having two issues with it :
1. the timer doesn't show, just the timer window (I'm probably making a very simple mistake, I have never used timers before but I did everything this tutorial said to do )
2. for some reason however I try to remove the player group I have here as Temp_PlayerGroup (I tried with the way with bj and the way after), "jass helper" tells me there is an error.
here's the whole thing, the triggers "final loop" and "zeppelin" are prob not relevant, but I included them in case it helps get the full picture. thanks!
(using bribe's unit indexer)
this spell is supposed to display a timer (3 min) and when the timer runs out it kills all town hall type units. if the casting hero is killed first the timer is canceled.
I'm having two issues with it :
1. the timer doesn't show, just the timer window (I'm probably making a very simple mistake, I have never used timers before but I did everything this tutorial said to do )
2. for some reason however I try to remove the player group I have here as Temp_PlayerGroup (I tried with the way with bj and the way after), "jass helper" tells me there is an error.
here's the whole thing, the triggers "final loop" and "zeppelin" are prob not relevant, but I included them in case it helps get the full picture. thanks!
(using bribe's unit indexer)
-
set spell
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to The Final Countdown
-
Actions
- Unit - Create 1 dummywinventory for (Triggering player) at Hidepoint facing Default building facing degrees
- Unit - Add a 180.00 second Generic expiration timer to (Last created unit)
- Set CV = (Custom value of (Last created unit))
- Set FinalDummy[(Custom value of (Triggering unit))] = (Last created unit)
- Unit Group - Add (Last created unit) to FinalDummies
- Set FinalCaster[CV] = (Triggering unit)
- Game - Display to (All players) for 30.00 seconds the text: ((Name of (Triggering player)) + ('s + ((Name of (Triggering unit)) + has rigged everyone's main bases to explode. You have 3 minutes to kill him if you want to prevent this from happening. )))
- Countdown Timer - Create a timer window for FinalTimer[CV] with title The Final Countdown
- Set FinalTimerWindow[CV] = (Last created timer window)
- Countdown Timer - Show (Last created timer window)
- Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 180.00 seconds
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Unit - Grant shared vision of (Triggering unit) to (Picked player)
-
Loop - Actions
- Unit Group - Add (Triggering unit) to FinalGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Final Loop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on Final Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
zeppelin
-
Events
- Unit - A unit Is loaded into a transport
-
Conditions
- ((Loading unit) is in FinalGroup) Equal to True
-
Actions
- Set CV = (Custom value of (Triggering unit))
- Set FinalZeppelin[CV] = (Transporting unit)
-
Events
-
Final Loop
-
Events
- Time - Every 10.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in FinalGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is being transported) Equal to False
-
Then - Actions
- Set TempPoint = (Position of (Picked unit))
-
Else - Actions
- Set CV = (Custom value of (Picked unit))
- Set TempPoint = (Position of FinalZeppelin[CV])
-
If - Conditions
- Cinematic - Ping minimap for (All players) at TempPoint for 2.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
- Custom script: call RemoveLocation (udg_TempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (FinalGroup is empty) Equal to True
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in FinalGroup and do (Actions)
-
Events
-
Stop Spell
-
Events
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is in FinalGroup) Equal to True
-
Actions
- Set ID = (Custom value of (Triggering unit))
- Set CV = (Custom value of FinalDummy[ID])
- Set Temp_PlayerGroup = (All enemies of (Owner of (Dying unit)))
-
Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
-
Loop - Actions
- Unit - Deny shared vision of (Triggering unit) to (Picked player)
-
Loop - Actions
- Custom script: Custom script: call DestroyForce(udg_Temp_PlayerGroup)
- Unit Group - Remove (Triggering unit) from FinalGroup
- Countdown Timer - Destroy FinalTimerWindow[CV]
- Unit Group - Remove FinalDummy[ID] from FinalDummies
- Unit - Remove FinalDummy[ID] from the game
- Game - Display to (All players) for 30.00 seconds the text: ((Name of (Triggering player)) + ('s + ((Name of FinalCaster[CV]) + has been neutralized. )))
-
Events
-
final finish
-
Events
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is in FinalDummies) Equal to True
-
Actions
- Set CV = (Custom value of (Dying unit))
- Set Temp_PlayerGroup = (All enemies of (Owner of (Dying unit)))
-
Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
-
Loop - Actions
- Unit - Deny shared vision of FinalCaster[CV] to (Picked player)
-
Loop - Actions
- Custom script: Custom script: call DestroyForce(udg_Temp_PlayerGroup)
- Unit Group - Remove FinalCaster[CV] from FinalGroup
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A town-hall-type unit) Equal to True)) and do (Actions)
-
Loop - Actions
- Unit - Kill (Picked unit)
-
Loop - Actions
- Countdown Timer - Destroy FinalTimerWindow[CV]
- Unit - Remove (Triggering unit) from the game
-
Events