• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Why this doesnt work?

Not open for further replies.
Level 8
Aug 4, 2008
Well, it spams only 90 degrees, why doesnt spam 360 degrees?
(Is this spell MUI?)
  • Fire Nova
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to FN
    • Actions
      • Set Integer[1] = (Integer[1] + 1)
      • Set Caster[Integer[1]] = (Triggering unit)
      • Set Position[Integer[1]] = (Position of ToD_Caster[Integer[1]])
      • Set Owner[Integer[1]] = (Owner of ToD_Caster[1])
      • Set Ability[Integer[1]] = (Level of Taste of Death for Caster[Integer[1]])
      • Set Dummy_Ability[Integer[1]] = Fire Nova(dummy)
      • For each (Integer Integer[2]) from 1 to 36, do (Actions)
        • Loop - Actions
          • Set Integer[2] = (Integer[2] + 1)
          • Set Target_Location[Integer[2]] = (Position[Integer[1]] offset by 50.00 towards (10.00 x (Real(Integer[2]))) degrees)
          • Unit - Create 1 Dummy for Owner[Integer[1]] at Target_Location[Integer[2]] facing Default building facing degrees
          • Set Dummy[Integer[2]] = (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to Dummy[Integer[2]]
          • Unit - Add Dummy_Ability[Integer[1]] to Dummy[Integer[2]]
          • Unit - Order Dummy[Integer[2]] to Undead Dreadlord - Carrion Swarm ToD_Target_Location[Integer[2]]
You don't need this line:
  • Set Integer[2] = (Integer[2] + 1)
The "For ..." loop already increases this variable for you. Doing so, you're increasing the variable twice - what will reduce the number of loops.

Also, as this trigger is almost instant, you don't need to worry about those variables like Integer[2], Integer[1], Target_Location[Integer[2]] and the like. You can use only a global, non-array variable for them, as it's impossible that this trigger runs more than once at the same time. It will always be MUI.
Not open for further replies.