• 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.

help me remove Variables

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
  • Raging Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Raging Strike
    • Actions
      • Set Ragingstrikerandomint = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Ragingstrikerandomint Equal to 1
        • Then - Actions
          • Set Ragingstrikepoint = (Position of (Casting unit))
          • Special Effect - Create a special effect at Ragingstrikepoint using Abilities\Spells\Items\AIsm\AIsmTarget.mdl
          • Set Ragingstrikeactive = (Last created special effect)
          • Unit - Add Item Damage Bonus (+50) to (Triggering unit)
          • Wait 1.00 seconds
          • Special Effect - Destroy Ragingstrikeactive
          • Wait 29.00 seconds
          • Unit - Remove Item Damage Bonus (+50) from (Triggering unit)
          • Custom script: call RemoveLocation( udg_Ragingstrikepoint )
        • Else - Actions

Having trouble removing:

Variables
Ragingstrikerandomint : (Line: 7) Location - Removed: No
Ragingstrikepoint : (Line: 12) Location - Removed: Yes
Ragingstrikeactive : (Line: 14) Unit Group - Removed: No

Ragingstrikerandomint = integar
Ragingstrikeactive = special effect

Basicly when you use this ability you have a 1/3 chance of gaing +50dam for 30 seconds, and i want it to show a special effect to let the user know they have the buff
 
if Ragingstrikerandomint is an integer variable, not location, you don't need to remove it.

also by Destroying Ragingstrikeactive with that trigger, it's removed. but you don't need to wait 1 second. it will still play the animation, and also you don't even need to set it to a variable, you can use Last created special effect.


Also,

you can remove the Ragingstrikerandomint and just put the trigger in *If Random number from 1 to 3 = 1 then .... else ....*
 
Level 10
Joined
Apr 3, 2006
Messages
535
thanks very much, i managed to use a dummy unit in the end that will buff the caster and give the visual effect and also changed the trigger to hopefully be better alla round
  • Raging Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Raging Strike
      • (Random integer number between 1 and 10) Equal to 1
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 3) Equal to 1
        • Then - Actions
          • Set Ragingstrikepoint = (Position of (Casting unit))
          • Unit - Create 1 Last Stand (Dummy caster) for (Triggering player) at Ragingstrikepoint facing Default building facing degrees
          • Unit - Add . Raging Strike effect to (Last created unit)
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Casting unit)
          • Wait 1.00 seconds
          • Custom script: call RemoveLocation( udg_Ragingstrikepoint )
          • Unit - Remove (Last created unit) from the game
        • Else - Actions
thanks for the help +rep
 
Status
Not open for further replies.
Top