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

[vJASS] Retrieving list of active triggers

Status
Not open for further replies.
Level 13
Joined
Oct 10, 2009
Messages
439
Hey Hive!

So basically I want to make a timestop ability, and the easiest way of doing that (for my map) is grabbing a list of active triggers, temporarily disabling them and then re-enabling them later on.

Does anyone know how to get a list of active triggers?
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
I do not believe there is a way to get such a thing. You can pause the timers that run periodic events and as long as you aren't using waits in your map then that should pause everything that's 'running'. The Trigger Queue accessible in GUI, as far as I understand, is only for the functions that explicitly use it rather than covering all pending triggers. But I could be wrong.
 
Level 13
Joined
Oct 10, 2009
Messages
439
You won't come around making your trigger architecture allowing to pause it at any time. For most simple triggers maybe already one global variable would be enough, like "GlobalTimeIsStopped". And in each trigger there's a condition to check for its value, to proceed, or not.

Yeah, to me that'd be a massive pain the ass though.
I was hoping to just get all triggers active, loop except for some certain named ones, and turn them off. And just re-enable them later on.
 
Triggers are generated globals, created at background, when map is compiled. There's no "normal" approach to catch these created lines of code.
  1. Direct bytecode execution in JASS VM allowed to trick around, ggvars. ( advanced knowledge and older patch needed)
  2. You can to extract created JASS script each time after save/before test from the map archive, to see the generated globals. Then code could be re-written to take advantage of it. I wouldn't recommend this.
  3. You make your triggers directly allow it. ( boolean vars, ...)
I would go with the third.
 
Level 13
Joined
Oct 10, 2009
Messages
439
Triggers are generated globals, created at background, when map is compiled. There's no "normal" approach to catch these created lines of code.
  1. Direct bytecode execution in JASS VM allowed to trick around, ggvars. ( advanced knowledge and older patch needed)
  2. You can to extract created JASS script each time after save/before test from the map archive, to see the generated globals. Then code could be re-written to take advantage of it. I wouldn't recommend this.
  3. You make your triggers directly allow it. ( boolean vars, ...)
I would go with the third.

One of those is definitely more sane than the others. Thanks for the help.
 
Status
Not open for further replies.
Top