Trigger Timing.

Shadows

New Member
Reaction score
2
Basically when I let the trigger run for any amount of time it eventually goes off timing, and does not work the way I want it to anymore. I'm basically working on a bounding map for warcraft. The trigger itself works, just does not keep in sync. Any suggestions?

Code:
Trap 1 ll  White
    Events
    Conditions
        Trap[1] Equal to 0
    Actions
        Wait 1.50 seconds
        Unit - Create 1 IGOBOOM1 for Neutral Passive at (Center of W1 <gen>) facing 90.00 degrees
        Unit Group - Pick every unit in (Units in W1 <gen>) and do (Actions)
            Loop - Actions
                Unit - Explode (Picked unit)
        Unit - Create 1 IGOBOOM1 for Neutral Passive at (Center of W2 <gen>) facing 90.00 degrees
        Unit Group - Pick every unit in (Units in W2 <gen>) and do (Actions)
            Loop - Actions
                Unit - Explode (Picked unit)
        Unit - Create 1 IGOBOOM1 for Neutral Passive at (Center of W3 <gen>) facing 90.00 degrees
        Unit Group - Pick every unit in (Units in W3 <gen>) and do (Actions)
            Loop - Actions
                Unit - Explode (Picked unit)
        Unit - Create 1 IGOBOOM1 for Neutral Passive at (Center of W4 <gen>) facing 90.00 degrees
        Unit Group - Pick every unit in (Units in W4 <gen>) and do (Actions)
            Loop - Actions
                Unit - Explode (Picked unit)
        Trigger - Run (This trigger) (checking conditions)

There is 4 other triggers that go along with this, one is the same as this only diffrent locations, then there is a start/stop trigger.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Use a timer...

Countdown timer - Start <some timer variable> as a repeating timer that will expire in 1.5 seconds


Event:
- <some timer variable> expires
Conditions:
Actions:
- your actions here, without that wait, and without that weird "trigger - run"


You may want to read a memory leak tutorial.
 

minikrampan

Ultra Cool Member
Reaction score
28
Why not use a periodic timer every 1.5 s of game or will it also go off timing?

Edit: made a trigger that seems to work.

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set regions[1] = W1 <gen>
        Set regions[2] = W2 <gen>
        Set regions[3] = W3 <gen>
        Set regions[4] = W4 <gen>

Code:
Trap 1 ll  White
    Events
        Time - Every 1.50 seconds of game time
    Conditions
        Trap[1] Equal to 0
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Set sp[(Integer A)] = (Center of regions[(Integer A)])
                Unit - Create 1 Footman for Neutral Passive at sp[(Integer A)] facing Default building facing (270.0) degrees
                Unit - Explode (Last created unit)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top