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

Loop/Wait Bug(?)

Status
Not open for further replies.
Level 1
Joined
Mar 18, 2009
Messages
2
I am having an issue where I have multiple dummy units created by a loop, that fire impale at a polar offset point. Inbetween firings I have a brief wait to make it appear as a rotating arm effect. However when I test it my loop ends after 2-3 iterations after working correctly, when it is supposed to be 24 iterations.

  • Set MarkoftheDivineAngle = 0.00
  • Set MarkPoint = (Target point of ability being cast)
  • For each (Integer A) from 1 to 24, do (Actions)
    • Loop - Actions
      • Unit - Create 1 Dummy Caster 2 for (Owner of (Triggering unit)) at MarkPoint facing Default building facing degrees
      • Unit - Set level of Mark of Divinity Effect (Neutral Hostile) for (Last created unit) to (Level of Mark of the Divine for (Triggering unit))
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (MarkPoint offset by 256.00 towards MarkoftheDivineAngle degrees)
      • Unit - Create 1 Dummy Caster 2 for (Owner of (Triggering unit)) at MarkPoint facing Default building facing degrees
      • Unit - Set level of Mark of Divinity Effect (Neutral Hostile) for (Last created unit) to (Level of Mark of the Divine for (Triggering unit))
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (MarkPoint offset by 256.00 towards (MarkoftheDivineAngle + 180.00) degrees)
      • Set MarkoftheDivineAngle = (MarkoftheDivineAngle + 30.00)
      • Wait 0.17 game-time seconds
Any ideas as to why it's stopping at random?
 
Level 1
Joined
Mar 18, 2009
Messages
2
I solved it by pasting the code 24 times rather than the loop, any ideas as to why this worked?
 
Status
Not open for further replies.
Top