• 🏆 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!

removing events from triggers

Status
Not open for further replies.
Level 8
Joined
Aug 4, 2006
Messages
357
world editor supports adding events to triggers, but is there any way to remove events from triggers (or at least replace them)?

for example, i want to be able to change how often a periodic trigger runs. the trigger starts off with no events. i do
JASS:
call TriggerRegisterTimerEventPeriodic( gg_trg_periodic_unit_spawn, udg_unitSpawnDelay )
to make it start spawning units every unitSpawnDelay seconds. I want to remove this event later, change the value of unitSpawnDelay, and add the event again. i'm not sure if adding another periodic event would just overwrite the old one, but i would assume not.
 
Level 4
Joined
Sep 18, 2007
Messages
104
Maybe you could disable your trigger and enable another one with a different value?

Or have an integer variable for the spawn delay, and just set it to a different value?

I really don't know JASS that much and I may of misunderstood your question.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
The only way to remove events is to destroy the trigger which the events are bound to and make a new one and reattach any events that you wanted to stay.
This however is not the safest thing to do as destroying triggers can cause handle value bugs resulting in WC3 crashing.
 
Status
Not open for further replies.
Top