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

Staff of Preservation

Status
Not open for further replies.
Level 1
Joined
Jan 16, 2006
Messages
5
Hello everyone

How I can make an order to a dummy unit with the Staff of Preservation ability.

I'm making a spell that if the target is freezed the target is teletransported to his base with 1 hit point and 0 mana.

Thanks for the help.

(Sorry but I don't write english very good)
 
Level 3
Joined
Dec 22, 2005
Messages
38
Well when you create the dummy unit in the spell you can reference it by "LastCreatedUnit". You can also use this to store the units reference in a unit variable if you wish to manipulate it outside of the trigger or you have "wait" actions that could desynch what "LastCreatedUnit" is referencing. Like if the trigger fires again by something else while it's still in a wait period o the previous triggering event it will create a new unit and both triggers will be pointing at the same unit.

You have to be careful with that stuff.

But if there is tracable information that's unique to the unit you can find it that way and issue it an order, but typically a dummy is created and manipulated directly afterwards like Order unit "LastCreatedUnit" to cast spell "Unholy Frenzy" or whatever the spell's base name is that you made your custom ability off of.
 
Level 1
Joined
Jan 16, 2006
Messages
5
This is fine for me:

Code:
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Dimensional Strike
((Target unit of ability being cast) has buff Freezing Breath) Equal to True
Actions
--- bla, bla  if with the condition of owner of the unit----
Wait 0.20 seconds
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
Unit - Move (Target unit of ability being cast) instantly to (Position of The Wordl Tree 0059 <gen> (Yes is a DOTA'S spell :P )
Unit - Set mana of (Target unit of abiliy being cast) to 0.00
Unit - Set life of (Target unit of ability being cast) to 1.00
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl

There are other way????
 
Status
Not open for further replies.
Top