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

Adding/Removing Bounces

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
So I have an ability that gives bouncing attacks for a duration, it is all working fine minus that the caster retains the bouncing effects after the buff is gone. I'm not sure what I'm missing as the triggers to start and end it are practically identical but the number of targets doesn't seem to getting reset back to 1??

  • Extra Layzors Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Extra Layzors! (4)
    • Actions
      • Unit Group - Add (Casting unit) to ExtraLayzors_Group
      • Unit - Set Unit: (Casting unit)'s Weapon Integer Field: Attack Maximum Number Of Targets ('utc1')at Index:1 to Value: (2 + (((Level of Extra Layzors! (4) for (Casting unit)) - 1) / 3))
      • Animation - Add the Alternate animation tag to (Casting unit)
      • Trigger - Turn on Extra Layzors Loop <gen>

  • Extra Layzors Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ExtraLayzors_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Extra Layzors! ) Equal to False
            • Then - Actions
              • Unit Group - Remove (Picked unit) from ExtraLayzors_Group.
              • Unit - Set Unit: (Picked unit)'s Weapon Integer Field: Attack Maximum Number Of Targets ('utc1')at Index:1 to Value: 1
              • Animation - Remove the Alternate animation tag to (Picked unit)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in ExtraLayzors_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Status
Not open for further replies.
Top