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

Why isn't this trigger working?

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
  • ES In Range
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Number of units in ESAll)))
      • Game - Display to (All players) the text: trigger works
      • Unit Group - Pick every unit in ESAll and do (Actions)
        • Loop - Actions
          • Set ESAllIndex = (Player number of (Owner of (Picked unit)))
          • Set ESAllDummiesIndex[ESAllIndex] = (Custom value of (Picked unit))
          • Set ESAllPosition[ESAllDummiesIndex[ESAllIndex]] = (Position of (Picked unit))
          • Game - Display to (All players) the text: (ES Unit ID + ((String(ESAllDummiesIndex[ESAllIndex])) + ( and Player ID + ((String(ESAllIndex)) + ( checking if in range of 500 from + (Name of ESTarget[ESAllIndex[ESAllIndex]]))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between ESAllPosition[ESAllDummiesIndex[ESAllIndex]] and ESTargetPos[ESAllIndex]) Less than or equal to 500.00
            • Then - Actions
              • Game - Display to (All players) the text: ES in range
              • Unit Group - Add (Picked unit) to ESPossHero[(Player number of (Owner of ESTarget[ESAllIndex]))]
              • Unit Group - Remove (Picked unit) from ESAll
              • Custom script: call RemoveLocation(udg_ESAllPosition[udg_ESAllDummiesIndex[udg_ESAllIndex]])
            • Else - Actions
          • Custom script: call RemoveLocation(udg_ESAllPosition[udg_ESAllDummiesIndex[udg_ESAllIndex]])
Can somebody tell me why isn't this trigger working? I don't get the debug message 'trigger works' and I don't have other triggers which turn on/off this trigger..
 
Level 11
Joined
Jan 23, 2015
Messages
788
How do you mean is it printed correctly?

Don't worry, I didn't just type: (String((Number of units in ESAll))) in it

Ow you're using dynamic indexing :/ It causes these kind of problems (to me, it disables all triggers). I'd really like to know the solution to this because I really want to create some cool spells but I'm just unable to do that :angry:

Strange, I'm using dynamic indexing in an other spell of mine.. and it works perfectly!

....Crap, I've just tested out some stuff again, and guess what, the messages in my map aren't displaying again, I've had this problem before, but then I shut down a few triggers and the messages started displaying again, now WHAT'S CAUSING THIS STUPID BUG?? :/

This means, my trigger fires, but isn't working, while the main problem are the messages, which does not display..
 
Level 11
Joined
Jan 23, 2015
Messages
788
I don't see any message of my map, but I shot down this trigger and they started displaying again:

  • ES Orbit
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set ESAllPlayers = (All players)
      • Player Group - Pick every player in ESAllPlayers and do (Actions)
        • Loop - Actions
          • Set ESOrbitIndex = (Player number of (Picked player))
          • Unit Group - Pick every unit in ESPossHero[ESOrbitIndex] and do (Actions)
            • Loop - Actions
              • Set ESOrbitDummyIndex[ESOrbitIndex] = (Custom value of (Picked unit))
              • Set ESOrbitDummyPos = (Position of (Picked unit))
              • Set ESTargetPos[ESOrbitDummyIndex[ESOrbitIndex]] = (Position of ESTarget[ESOrbitIndex])
              • Set ESMovePos = (ESTargetPos[ESOrbitDummyIndex[ESOrbitIndex]] offset by 500.00 towards ((Angle from ESDummyPos to ESTargetPos[ESOrbitDummyIndex[ESOrbitIndex]]) + 15.00) degrees)
              • Unit - Move (Picked unit) instantly to ESMovePos, facing ((Angle from ESOrbitDummyPos to ESTargetPos[ESOrbitDummyIndex[ESOrbitIndex]]) + 90.00) degrees
              • Game - Display to (All players) the text: (ES Unit ID + ((String(ESOrbitDummyIndex[ESOrbitIndex])) + ( and Player ID + ((String(ESOrbitIndex)) + ( moved around + (Name of ESTarget[ESOrbitDummyIndex[ESOrbitIndex]]))))))
              • Custom script: call RemoveLocation(udg_ESOrbitDummyPos)
              • Custom script: call RemoveLocation(udg_ESMovePos)
          • Custom script: call DestroyGroup(udg_ESPossHero[udg_ESOrbitIndex])
      • Custom script: call DestroyForce(udg_ESAllPlayers)
Can someone tell me, why is this trigger causing my messages to not display what is wrong with it?
 
Status
Not open for further replies.
Top