• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Vanish spell help

Status
Not open for further replies.
Level 12
Joined
Nov 5, 2007
Messages
730
Okay,ive had a couple of spells i couldnt make work so far,and ive always gotten usefull help here,so im counting on you guys :)

Im making a Vanish spell,its based off of Wind Walk,only difference is that the Hero throws down a smoke bomb that produces a Cloud effect for 5 seconds,and turns invisible.Ive done the trigger but its just not working.Help please!


  • Vanish
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Vanish
    • Actions
      • Wait 0.10 seconds
      • Unit - Create 1 Vanish Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Set Vanish = (Last created unit)
      • Unit - Order Vanish to Human Dragonhawk Rider - Cloud (Position of (Casting unit))
      • Wait 5.00 seconds
      • Unit - Remove Vanish from the game
 
Level 11
Joined
Feb 22, 2006
Messages
752
Casting Unit doesn't work after waits - use Triggering Unit, it's faster anyway. And also consider using Unit Starts the Effect of an Ability as your event; Unit Begins Casting might fire even if the unit never actually cast the ability. Also, you are leaking two locations, consider saving your locations in a variable and calling RemoveLocation() on them when you are done. Also, for the dummy unit instead of waiting 5 seconds and removing it, just add a 5 second generic expiration timer to it.
 
  • Vanish
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Vanish
    • Actions
      • Wait 0.10 seconds
      • Unit - Create 1 Vanish Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Set Vanish = (Last created unit)
      • Unit - Order Vanish to Human Dragonhawk Rider - Cloud (Position of (Casting unit))
      • Wait 5.00 seconds
      • Unit - Remove Vanish from the game
The trigger isn't MUI because if someone else casted Vanish, the dummy unit wouldn't get destroyed. You could just destroy the dummy unit with Unit -
  • Add a 5.00 second Generic expiration timer to (Last created unit)
And then create another trigger that fires when a dummy unit dies so you could remove it.

But then, that's not the real problem.

For your Vanish ability, you could change the Data - Transition Time to 5.00 so the casting unit would disappear in 5 seconds.

Make sure the dummy unit has the Cloud ability. (Which I bet you've already done)

Change the
  • Unit - A unit Begins casting an ability
to a
  • Unit - A unit Starts the effect of an ability
so players using this ability can't cheat to get a smoke effect when they aren't vanishing.

Well, that's all I can think of...
Edit: Darn it, I type too slow. :p
 
Status
Not open for further replies.
Top