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

I don't know

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Ok, I've made it work

Is this trigger done correctly? So it will add the spell book ONCE if unit has buff and when unit doesn't have buff anymore, it will be removed ONCE.
  • Battle Drums Double Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- --------------- Actions --------------- --------
      • Set TempPoint = (Position of BattleDrums_TrigUnit)
      • For each (Integer TempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player(TempInt)) slot status) Equal to Is playing
            • Then - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units owned by (Player(TempInt)) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Battle Drums ) Equal to True
                      • BattleDrums_Boolean[TempInt] Equal to False
                    • Then - Actions
                      • Set BattleDrums_Boolean[TempInt] = True
                      • Unit - Add Spell Book (Hero Ability) to (Picked unit)
                      • Unit - Set level of Dummy Double Damage (BladeMaster) (Hero Ability) for (Picked unit) to (Level of Battle Drums (Hero Ability) for BattleDrums_TrigUnit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) has buff Battle Drums ) Equal to False
                          • BattleDrums_Boolean[TempInt] Equal to True
                        • Then - Actions
                          • Unit - Remove Spell Book (Hero Ability) from (Picked unit)
                        • Else - Actions
            • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top