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

[Trigger] Trigger not working on map init

Status
Not open for further replies.
Level 4
Joined
Oct 5, 2012
Messages
52
It does work when I set the timer to 0.00 though :vw_wtf:

  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set NUMBEMAX = 69
      • For each (Integer A) from 1 to NUMBEMAX, do (Actions)
        • Loop - Actions
          • Set NUMBERS[(Integer A)] = (Integer A)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
      • Trigger - Run FIREy Copy <gen> (ignoring conditions)
  • FIREy Copy
    • Events
    • Conditions
    • Actions
      • Set INTEGER = (Random integer number between 1 and NUMBEMAX)
      • Set RANDNUMB = NUMBERS[INTEGER]
      • Set NUMBERS[INTEGER] = NUMBERS[NUMBEMAX]
      • Set NUMBEMAX = (NUMBEMAX - 1)
      • Unit - Create 1 Randompick[RANDNUMB] for Player 9 (Gray) at (Center of Region 094 Copy 11 <gen>) facing Default building facing degrees
      • Set wave[COUNTER] = (Last created unit)
      • Hero - Set (Last created unit) Hero-level to COUNTER, Hide level-up graphics
      • Set itemnum = (Random integer number between 1 and 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 1
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 2
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 3
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 4
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 5
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • itemnum Equal to 6
        • Then - Actions
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
          • Hero - Create (Random level -1 item-type) and give it to wave[COUNTER]
        • Else - Actions
      • Set COUNTER = (COUNTER + 1)
The trigger itself is working, but I can't do it on map init. I need to do it on map init though, because if I do it on 0.00 it disconnects players with slower pcs. Help needed!
 
Level 12
Joined
May 22, 2015
Messages
1,051
also your first trigger is blegh. just make a loop and put the run trigger action in it.
^ This.

Which of these triggers is higher on the list of triggers in the editor?

I think maybe what is happening is you are trying to run a trigger before it is actually created. There is a function that gets run to build each trigger during map initialisation. Map initialisation triggers run during this time. I believe it runs from top to bottom in the list (that is at least how the code is checked for syntax errors), so you might just be running a trigger that doesn't do anything. It just hasn't been properly created yet.

Try switching the order of the triggers in the list. Otherwise, 0.00 elapsed time should be fine.
 
Status
Not open for further replies.
Top