• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Can't remove spellbook

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
192
Here I am again, asking for help. This time around, I have tried to create a multi-leveled ability which adds Immolation to the target unit for a short while, then removing it. Since I did not want an immolation icon popping up on the abilities panel, I decided to use a Disabled Spellbook.

My problem is that, while the buff from the original spell goes away, the spellbook/immolation won't seem to be removed. The ability has two triggers.
Adding the Ability
  • Lightning Shield
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Shield
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Ability being cast) for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Add Lightning Shield Passive L1 (Disabled) to (Target unit of ability being cast)
          • Countdown Timer - Start LightningShield_Timer as a One-shot timer that will expire in 10.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of (Ability being cast) for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit - Add Lightning Shield Passive L2 (Disabled) to (Target unit of ability being cast)
              • Countdown Timer - Start LightningShield_Timer as a One-shot timer that will expire in 13.00 seconds
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of (Ability being cast) for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit - Add Lightning Shield Passive L3 (Disabled) to (Target unit of ability being cast)
                  • Countdown Timer - Start LightningShield_Timer as a One-shot timer that will expire in 16.00 seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of (Ability being cast) for (Triggering unit)) Equal to 4
                    • Then - Actions
                      • Unit - Add Lightning Shield Passive L4 (Disabled) to (Target unit of ability being cast)
                      • Countdown Timer - Start LightningShield_Timer as a One-shot timer that will expire in 19.00 seconds
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of (Ability being cast) for (Triggering unit)) Equal to 5
                        • Then - Actions
                          • Unit - Add Lightning Shield Passive L5 (Disabled) to (Target unit of ability being cast)
                          • Countdown Timer - Start LightningShield_Timer as a One-shot timer that will expire in 22.00 seconds
                        • Else - Actions
                          • Do nothing
And removing the ability
  • LS Remove
    • Events
      • Time - LightningShield_Timer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to LightningShield_Group
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Picked unit) has buff Lightning Shield) Equal to True) or (((Picked unit) has buff Lightning Shield (Caster)) Equal to True)
            • Then - Actions
              • Unit - Remove Lightning Shield Passive L1 (Disabled) from (Picked unit)
              • Unit - Remove Lightning Shield Passive L2 (Disabled) from (Picked unit)
              • Unit - Remove Lightning Shield Passive L3 (Disabled) from (Picked unit)
              • Unit - Remove Lightning Shield Passive L4 (Disabled) from (Picked unit)
              • Unit - Remove Lightning Shield Passive L5 (Disabled) from (Picked unit)
              • Custom script: call DestroyGroup(udg_LightningShield_Group)
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Custom script: call DestroyGroup(udg_LightningShield_Group)
              • Trigger - Turn off (This trigger)
+rep for the help, thx in advance.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
*Remove do nothing
*You don't have to have Start countdown timer... 5 times there. Use 7 + 3 x level of ability expiration time and move it out of the if/then/else
*Add triggering unit into LightningShield_Group in the first trigger
*In the second trigger, don't pick all units in the map, pick units in the LightningShield_Group
*Never destroy LightningShield_Group
*Don't turn off the second trigger
*If the unit doesn't have the buff remove it from the group

It could be possible that the unit still has the buff at the time when the check is made. Use game - display text message to know for sure.
 
Status
Not open for further replies.
Top