• 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.

Periodic Trigger vs Timer (efficiency)

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
If I have a periodic trigger that never needs to be accessed by anything (as in, never turns off, never needs extra conditions or events, etc), is it more efficient to just use a repeating timer that runs the same code, or should I keep them as triggers?
 
Level 12
Joined
May 22, 2015
Messages
1,051
A timer is more efficient if you are using JASS, as a callback function is lighter than a trigger evaluation. How often is this going to run, though?

Kind of just in general. It just means I can turn any periodic triggers I have into timers. At most, they will run once a second.

I am using triggers for the knockback system and probably a projectile system if I make that since I can turn them off that way. I suppose I could change it so using timers would work though.
EDIT:
Meant to add that this is the main intensive one.

I also have a regen trigger that is going every 0.25 seconds. I can probably make that one a regular timer.
 
Status
Not open for further replies.
Top