• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Timer [Number X] expires, Unit [Number X] does /whatevs

Status
Not open for further replies.
Level 7
Joined
Dec 28, 2009
Messages
257
Heya folks, another question of mine.. :D

This one is hard nut for me - basically, ive got trigger that every 0.5 seconds picks unit in region, that has got 2 debuffs from spells, and then casts another debuff spell on it.

And i want to add another trigger, that after 15 seconds (basically when last debuff dissapears) dummy is created and it spams another spell at that unit.

One option is to make timer, that when some unit matches conditions (it has both buffs) it gets hit by spell and 15 second timer starts.

However, this creates new problem - if ive got Timer Array, and Unit Array, how can i make trigger that when Timer [Number X] expires, unit of same integer array gets hit by spell? (i just need to recieve that integer of Timer Array)

Or, any other ideas how to make it? I tried making MUI spell with wait, but, didnt work out, apparently trigger with action /Every 0,5seconds/ doesnt like trigger /Wait 14 seconds/..

err

Thanks very much, I hope you understood me, in worst case ill post whole trigger and more comments.. danke :D
 
u can try to use an indexed / de-indexed method. i have one in my tutorial things a guier should know. the chapter is called how to index. u can also check out the wait chapter i have in there as it will show u some things u might not know about them.

indexing like a spell would be ur best bet. alternatively u could use hashtables but i dont recommend hashtables when u can use indexed arrays. ( the method i use in my tutorial)
 
Level 16
Joined
May 2, 2011
Messages
1,351
I had semilar thing in my map

One Timer per player, so i guess it would be totally fine to check for the correct timer in a loop. Just use a for loop and compare the expired timer to the ones in the array. GUI cant compare triggers if i remember correctly, so will have to compare Key(Expired Timer) == Key(TimerArray[Integer A]) or use a custom script,


This was my trigger
  • SpawnDemon
    • Events
      • Time - TimeForDemonSpawn[1] expires
      • Time - TimeForDemonSpawn[2] expires
      • Time - TimeForDemonSpawn[3] expires
      • Time - TimeForDemonSpawn[4] expires
      • Time - TimeForDemonSpawn[5] expires
      • Time - TimeForDemonSpawn[6] expires
      • Time - TimeForDemonSpawn[7] expires
      • Time - TimeForDemonSpawn[8] expires
      • Time - TimeForDemonSpawn[9] expires
      • Time - TimeForDemonSpawn[10] expires
      • Time - TimeForDemonSpawn[11] expires
      • Time - TimeForDemonSpawn[12] expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: set udg_HandleIdNoTable = GetHandleId(GetExpiredTimer())
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Key (Expiring timer)) Equal to HandleIdNoTable
            • Then - Actions
              • Set RandomInteger = (Random integer number between 1 and 3)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 1
                • Then - Actions
                  • Player - Make Doom Guard (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Doom Guard (Demon Gate)
                  • Player - Make Doom Guard (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                  • Custom script: call IssueTrainOrderByIdBJ( udg_Gate[udg_A], 'n016' )
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 2
                • Then - Actions
                  • Player - Make Infernal (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Infernal (Demon Gate)
                  • Player - Make Infernal (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 3
                • Then - Actions
                  • Player - Make Fel Ravager (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Fel Ravager (Demon Gate)
                  • Player - Make Fel Ravager (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Gate[(Integer A)] is alive) Equal to True
                • Then - Actions
                  • Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 100.00 seconds
                • Else - Actions
                  • Countdown Timer - Hide TimerWindow[(Integer A)] for (Player((Integer A)))
            • Else - Actions
Not sure it has flaws but it works
 
I had semilar thing in my map




This was my trigger
  • SpawnDemon
    • Events
      • Time - TimeForDemonSpawn[1] expires
      • Time - TimeForDemonSpawn[2] expires
      • Time - TimeForDemonSpawn[3] expires
      • Time - TimeForDemonSpawn[4] expires
      • Time - TimeForDemonSpawn[5] expires
      • Time - TimeForDemonSpawn[6] expires
      • Time - TimeForDemonSpawn[7] expires
      • Time - TimeForDemonSpawn[8] expires
      • Time - TimeForDemonSpawn[9] expires
      • Time - TimeForDemonSpawn[10] expires
      • Time - TimeForDemonSpawn[11] expires
      • Time - TimeForDemonSpawn[12] expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: set udg_HandleIdNoTable = GetHandleId(GetExpiredTimer())
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Key (Expiring timer)) Equal to HandleIdNoTable
            • Then - Actions
              • Set RandomInteger = (Random integer number between 1 and 3)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 1
                • Then - Actions
                  • Player - Make Doom Guard (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Doom Guard (Demon Gate)
                  • Player - Make Doom Guard (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                  • Custom script: call IssueTrainOrderByIdBJ( udg_Gate[udg_A], 'n016' )
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 2
                • Then - Actions
                  • Player - Make Infernal (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Infernal (Demon Gate)
                  • Player - Make Infernal (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 3
                • Then - Actions
                  • Player - Make Fel Ravager (Demon Gate) Available for training/construction by (Player((Integer A)))
                  • Unit - Order Gate[(Integer A)] to train/upgrade to a Fel Ravager (Demon Gate)
                  • Player - Make Fel Ravager (Demon Gate) Unavailable for training/construction by (Player((Integer A)))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Gate[(Integer A)] is alive) Equal to True
                • Then - Actions
                  • Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 100.00 seconds
                • Else - Actions
                  • Countdown Timer - Hide TimerWindow[(Integer A)] for (Player((Integer A)))
            • Else - Actions
Not sure it has flaws but it works

how is that supposed to help with his problem ?
also never use integer A/B make ur own integer and use that. integer A/B is less efficient and slower.
also anything u use twice or more store into a variable and use the variable.
this only help with 10 timers. if its a spell that last 15 seconds it can have a ton more than 10 timers.

this should be made into an MUI spell using indexed array / dynamic indexing / or hashtable. this should not be the way u posted sry dont mean to offend.
 
Level 16
Joined
May 2, 2011
Messages
1,351
how is that supposed to help with his problem ?
also never use integer A/B make ur own integer and use that. integer A/B is less efficient and slower.
also anything u use twice or more store into a variable and use the variable.
this only help with 10 timers. if its a spell that last 15 seconds it can have a ton more than 10 timers.

this should be made into an MUI spell using indexed array / dynamic indexing / or hashtable. this should not be the way u posted sry dont mean to offend.
It is supposed to help because
Timer X expires, Unit X summon Demon
So, if he has another events where he define the unit number X then this should help and being one way to do it. Now regarding the effeciency, I am not entirely sure what is the difference if you define your variable or use loop integer A, I have been reading it is
and wait I think there might be something rong in my trigger
 
Last edited:
look in my tutorial for the explanation of integer A/B and y it is bad to use.

the best way to do this is to simply use a counter. just use an integer as a counter to see when u do things.

alternatively u make a timer using custom script. then use a hashtable to store the unit and anything else u need keyed to the timer id by using GetHandleId( timer) with custom script. when the timer expires u use set timer = GetExpiredTimer()
then u load anything u need by using the key of the timer.
 
Level 16
Joined
May 2, 2011
Messages
1,351
Edit: ok there is something wrong in the following line
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Custom script: set udg_HandleIdNoTable = GetHandleId(GetExpiredTimer())
it should be HandleIdNoTable = GetHandleId(Timer(A)) or something
so basically it is loop that is checks if the expiring timer is the same as timer A, and if it does, then it does actions, otherwise it continues the loop:
(the way it is wrong shown in my trigger cuz the condition will satisfy for all values of A, but it should only satisfy one value of A of that particular expiring timer number and not any other
Sorry for any confusion
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,351
the problem is this only handles 12 timers and adding say 100 is insane this way. the way i say to do it doesnt require this at all. otherwise this isnt that bad of a way to do this. but remember anything u use twice or more store into a temp variable. example: GetExpiredTimer()
I dont see big difference, I mean, what is loop A but a counter? anyway, what I get from you is that both our ways is kinda counter but you dont want to counter using that function but counter by defining your own variable yes? we still more or less semilar then

lastly, I do not really know how to use my defined variable in my counter, or in other words, how to tell "trigger, go back to line XX like in a loop"
 
integer A/B is less efficient because it calls a function. using ur own integer doesnt do this. it is faster and more efficient to use ur own integer variable than to use integer A/B.
loop A is a loop not a counter but it is inefficient. loops are loops not counters.

and im saying that ur way is less efficient not just because u use integer A/B its the way u handle everything.
this should be a spell made with a counter. A counter is an integer that u simply increase when needed and decrease when needed.

as for ur last statement no idea what ur tlking about.
 
Level 7
Joined
Dec 28, 2009
Messages
257
Hmm, thanks, it works :D After 15 seconds when buff dissapears unit gets shot by spell, worked even at 3 units at once!

Only minor problem to me is, that even when unit is hit by spell after 15 seconds, its array counter still counts, and doesnt dissapear, so after that spell was used 10 times i had 10 array integers for counting, some with value like -150 :D and if unit got this effect twice, it had 2 counters, one with value like -50 and other with 6 (that next spell was casted at 0)

Stuff works fine, im just afraid it might cause some lags if it stored sh*tloads of value after some time (its used in boss encounter, so it shouldnt count for more than 7 minutes, but one never knows)

I guess id have to post my triggers for this, so you could see the problem and what exactly causes it (i mostly copied that Nova spell of yours and adjusted it :D) (i guess ill do that, but now i gtg, no time to upload with my slow pc :D)

Or, i dunno, basically it should somehow stop counting when value reaches 0, and that integer (lets say array number 2 and 3 are currently being counted down, and number 1 just reached 0) that stopped counting could be used again, so next unit would be in array number 1 instead of 4 :D

argh its confusing :D
thanks :D
brb with trigger screenshot i guess :D
 
Level 7
Joined
Dec 28, 2009
Messages
257
First thought: Well, i never learned how to do it properly, dunno how to copy whole trigger, and rewriting sucks :D

Second thought: Omg i got it!


First one: Casts debuff when unit gets two buffs
  • Time - Every 0.50 seconds of game time
  • Set Aeon_Conflagrate_TargGroup = (Units in Aeon Fight <gen> matching ((((Matching unit) has buff Flame Strike (Aeon)) Equal to True) and (((Matching unit) has buff Immolate (Aeon)) Equal to True)))
  • Unit Group - Pick every unit in Aeon_Conflagrate_TargGroup and do (Actions)
    • Loop - Actions
      • Set Aeon_Conflagrate_TargPosition = (Position of (Picked unit)) <---- i guess that "Picked unit" might leak?
      • Set Aeon_Siphon_Flame_Max_Index = (Aeon_Siphon_Flame_Max_Index + 1)
      • Set Aeon_Conflagrate_Target_SipFlm[Aeon_Siphon_Flame_Max_Index] = (Picked unit)
      • Set Aeon_Siphon_Fire_Countdown[Aeon_Siphon_Flame_Max_Index] = 16
      • Unit - Create 1 Spec Proc for Player 12 (Brown) at Aeon_Conflagrate_TargPosition facing Default building facing degrees
      • Unit - Add Aeon Conflagrate to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
      • Unit - Remove Immolate (Aeon) buff from (Picked unit) <---- Oh yea, i stole that from WoW :D kinda
      • Custom script: call RemoveLocation(udg_Aeon_Conflagrate_TargPosition)
  • Custom script: call DestroyGroup (udg_Aeon_Conflagrate_TargGroup)
Trigger two: Counts down and then fires another spell
  • Time - Every 1.00 seconds of game time
  • For each (Integer Number) from 1 to Aeon_Siphon_Flame_Max_Index, do (Actions)
    • Loop - Actions
      • Set Aeon_Siphon_Fire_Countdown[Number] = (Aeon_Siphon_Fire_Countdown[Number] - 1)
      • Game - Display to (All players) the text: (String(Aeon_Siphon_Fire_Countdown[Number])) <---- debug, to find bugs, to see how it works :D
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Aeon_Siphon_Fire_Countdown[Number] Equal to 0
        • Then - Actions
          • Game - Display to (All players) the text: ((OMFG BOOM SIPHON FIRE + (String(Number))) + (Name of Aeon_Conflagrate_Target_SipFlm[Number])) <---- debug, to find bugs, to see how it works :D
          • Unit - Create 1 Spec Proc for Player 12 (Brown) at Aeon_Generator_Positions[5] facing Default building facing degrees
          • Unit - Add Aeon Siphon Flame to (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova Aeon_Conflagrate_Target_SipFlm[Number]
          • Set Aeon_Charges_Amount = (Aeon_Charges_Amount + 1.00)
          • Set Aeon_Siphon_Fire_Countdown[Number] = 0 (This is related to another trigger)
        • Else - Actions
Thats whole trigger, any ideas how to erase unnecesary arrays that keep counting?

thanks :D
 
anything u use twice or more store into a temp variable and use the variable.

also picked unit doesnt leak. the location ( position of does leak tho.)

spells should not use 1 second timers. they should use .03 seconds. 1 second timers can make everything look bad.
also use this guide to post triggers.
http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

u also need to de-index or u will eventually hit the op-limit or the max array limit and break ur spell.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
spells should not use 1 second timers. they should use .03 seconds. 1 second timers can make everything look bad.
That only applies if movement or anything else continuous is involved. Also it actually is 0.0166 seconds so that every frame has an update, just people compromise at 0.03 although there is a noticeable difference.

The best systems would use a global timer that is set to run at 0.0166 and runs everything that needs smoothness. You throw in a weighting factor for performance so that if a limit is exceeded it drops down the smoothness to values like 0.02, 0.03 etc to prevent performance difficulties. So that the effects do not appear to slow down when this happens, you interpolate results based on the actual time that passed.

1 second is perfectly fine for most things that do not require smoothness such as an end-game check or AI operations.
 
Level 7
Joined
Dec 28, 2009
Messages
257
Use the function callback when you start the timer. This does break standard game saving though due to a bug but avoids the nasty problems associated with trigger and event creation/destruction.

anything u use twice or more store into a temp variable and use the variable.

u also need to de-index or u will eventually hit the op-limit or the max array limit and break ur spell.

I was afraid to use some small time fractions like 0.03 coz i still feel it might lag, like, 30 times per second it repeats some action (99% of time nothing happens though), thats intense :D

Also... Err, Dr. Super Good kinda confused me, whats function callback etc? :D

And i dunno whether this is de-indexing or what, but maybe i just used de-indexing and im not aware of it, but i think i fixed it by.. :D
adding one more integer, i guess you can see it there :D

INITIAL VALUE OF AEON_SIPHON_FLAME_MIN_INDEX IS 1
  • For each (Integer Number) from Aeon_Siphon_Flame_Min_Index to Aeon_Siphon_Flame_Max_Index, do (Actions)
    • Loop - Actions
      • Set Aeon_Siphon_Fire_Countdown[Number] = (Aeon_Siphon_Fire_Countdown[Number] - 1)
      • Game - Display to (All players) the text: (String(Aeon_Siphon_Fire_Countdown[Number]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Aeon_Siphon_Fire_Countdown[Number] Equal to 0
              • (Life of Aeon_Conflagrate_Target_SipFlm[Number]) Less than or equal to 150.00
        • Then - Actions
          • Game - Display to (All players) the text: ((OMFG BOOM SIPHON FIRE + (String(Number))) + (Name of Aeon_Conflagrate_Target_SipFlm[Number]))
          • Unit - Create 1 Spec Proc for Player 12 (Brown) at Aeon_Generator_Positions[5] facing Default building facing degrees
          • Unit - Add Aeon Siphon Flame to (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova Aeon_Conflagrate_Target_SipFlm[Number]
          • Set Aeon_Charges_Amount = (Aeon_Charges_Amount + 1.00)
          • Set Aeon_Siphon_Flame_Min_Index = (Aeon_Siphon_Flame_Min_Index + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Aeon_Siphon_Flame_Min_Index Greater than Aeon_Siphon_Flame_Max_Index
            • Then - Actions
              • Set Aeon_Siphon_Flame_Min_Index = 1
              • Set Aeon_Siphon_Flame_Max_Index = 0
            • Else - Actions
        • Else - Actions


So basically, it works, so far it seems bugless, or am i wrong? :D

When unit is about to be shot by spell after 15seconds and its the only one unit that is being counted down, Min Index is currently equal to Max Index (lets say both are 3), so units that were 1 and 2 are currently ignored, and when last unit is shot it resets back to 1.. Nicely neat, before i had 15 counters, 12 already in negative numbers, i fixed that and got 3 counters, while 12 were already 0 so array was as number 15 already, and now it resets to 1 after time :D

Only bad thing is, that is resets only after last untis get shot, and when no unit is being counted down, but that shouldnt be that big issue, i hope :D youll get some rest :D

*i couldnt figure out how to make it that way, that if currently unit of array 4 was counted down, and 1-2-3 were at 0, next unit would get lowest unused index, so 1, but it wouldnt get index that is already in use, like 4, or something like that (now when i look at it.. i might do it, somehow, maybe :D)

Well, any feedback? Thanks! :D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Also... Err, Dr. Super Good kinda confused me, whats function callback etc? :D
JASS:
native TimerStart takes timer whichTimer,real timeout,boolean periodic,code handlerFunc returns nothing
Code:
native TimerStart takes timer whichTimer,real timeout,boolean periodic,[U][B]code handlerFunc[/B][/U] returns nothing
That is what most people use.
 
Level 7
Joined
Dec 28, 2009
Messages
257
JASS:
native TimerStart takes timer whichTimer,real timeout,boolean periodic,code handlerFunc returns nothing
Code:
native TimerStart takes timer whichTimer,real timeout,boolean periodic,[U][B]code handlerFunc[/B][/U] returns nothing
That is what most people use.

Err... My skills with JASS are basically none, i know 2 functions to remove point + group leaks (+ one of few types of function to order unit cast spell?), ive got no idea what it means.. simple explanation please? :D
Or is it JASS command to start Timer called "TimerStart" ? Converting my trigger with action "start timer" resulted in some different lines, so i dunno, and i suck at JASS :D


look at my tutorial things a guier should know. look at the chapter how to index to properly make this MUI.

I did that before, but even thought i basically copied it (removed unnecesary integers i didnt use) it bugged with more units being counted down :O so i adjusted it by myself to sorta-working one

But i think i got the idea of whats going on in that trigger, when youve got 2 units in array being counted down, and 1st one finished 2nd unit moves to number 1 in array and so on, you dont get shitloads of arrrays :O


Merely added 4 lines from your trigger in tutorial
  • For each (Integer Number) from 1 to Aeon_Siphon_Flame_Max_Index, do (Actions)
    • Loop - Actions
      • Set Aeon_Siphon_Fire_Countdown[Number] = (Aeon_Siphon_Fire_Countdown[Number] - 1)
      • Game - Display to (All players) the text: (String(Aeon_Siphon_Fire_Countdown[Number]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Aeon_Siphon_Fire_Countdown[Number] Equal to 0
              • (Life of Aeon_Conflagrate_Target_SipFlm[Number]) Less than or equal to 150.00
        • Then - Actions
          • Game - Display to (All players) the text: ((OMFG BOOM SIPHON FIRE + (String(Number))) + (Name of Aeon_Conflagrate_Target_SipFlm[Number]))
          • Unit - Create 1 Spec Proc for Player 12 (Brown) at Aeon_Generator_Positions[5] facing Default building facing degrees
          • Unit - Add Aeon Siphon Flame to (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova Aeon_Conflagrate_Target_SipFlm[Number]
          • Set Aeon_Conflagrate_Target_SipFlm[Number] = Aeon_Conflagrate_Target_SipFlm[Aeon_Siphon_Flame_Max_Index]
          • Set Aeon_Conflagrate_Target_SipFlm[Aeon_Siphon_Flame_Max_Index] = No unit
          • Set Number = (Number - 1)
          • Set Aeon_Siphon_Flame_Max_Index = (Aeon_Siphon_Flame_Max_Index - 1)
        • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Aeon_Siphon_Flame_Max_Index Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
Well, thats it :D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Or is it JASS command to start Timer called "TimerStart" ? Converting my trigger with action "start timer" resulted in some different lines, so i dunno, and i suck at JASS :D
When the timer expires, "code handlerFunc" argument is run.

This usually comes as a constant pointer to a function such as.

JASS:
function runwhentimerexpires takes nothing returns nothing
endfunction
...
call TimerStart(sometimer, sometime, false, function runwhentimerexpires)
 
Status
Not open for further replies.
Top