1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

removing events from triggers

Discussion in 'Triggers & Scripts' started by maskedpoptart, Feb 17, 2009.

  1. maskedpoptart

    maskedpoptart

    Joined:
    Aug 4, 2006
    Messages:
    351
    Resources:
    1
    Spells:
    1
    Resources:
    1
    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
    Code (vJASS):
    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.
     
  2. chaoslord301

    chaoslord301

    Joined:
    Sep 18, 2007
    Messages:
    105
    Resources:
    0
    Resources:
    0
    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.
     
  3. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    no, theres no way to remove events.

    Suggestion: Use Timers.
     
  4. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,830
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    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.
     
  5. chaoslord301

    chaoslord301

    Joined:
    Sep 18, 2007
    Messages:
    105
    Resources:
    0
    Resources:
    0
    Wait he wasn't using timers before?