• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
  • 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