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

[Trigger] Why this doesnt work?

Status
Not open for further replies.
Level 8
Joined
Aug 4, 2008
Messages
279
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.
 
Status
Not open for further replies.
Top