• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJASS] Retrieving list of active triggers

Status
Not open for further replies.
Level 12
Joined
Oct 10, 2009
Messages
438
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 39
Joined
Feb 27, 2007
Messages
5,013
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 12
Joined
Oct 10, 2009
Messages
438
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 12
Joined
Oct 10, 2009
Messages
438
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