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

devour spell

Status
Not open for further replies.
Level 5
Joined
Jan 13, 2008
Messages
96
Hello! I want to make an triggered devour spell. After 2 seconds the devoured unit to be released... it will be like:
Unit starts effect of and ability
Ability being cast equal to Devour
Unit triggering unit gives damage to target unit of ability being cast 500 damage...
So the Blizzard Devour can only to kill an unit by giving 5 damage until the unit is dead... I want to make an ,,Devour`` which is giving that damage(this is what i know) but after 2-3 seconds the ,,unit ability being cast'' to be released. Is this possible? if yes i want to know how...
 
Yes, first of all hide the unit and then run a timer that will expire in e.g. 2 seconds; check whether the unit is alive (Boolean comparison), deal damage to it and then unhide it. In case the spell is fatal, at least the sfx of its death will be visible upon "release". Given the functionality of this spell, you don't really need periodic damage. However, in case you want to control it, to reveal the unit once it dies, you can run a periodic timer instead and make sure to be checking if the unit is still alive. If not, unhide it and create a special effect that demonstrates its death.
 
Level 5
Joined
Jan 13, 2008
Messages
96
Hide? How can i hide an unit?

I found how to hide...:) I'll try this! If doesnt work or will something happens which i dont expect or i dont know i will come again! :D

i did this:
Unit - starts effect an ability
Ability being cast equal to stormbolt
Hide target unit of ability being cast
100 Damage target
wait 2 sec
unhide target unit of ability being cast.
My target unit of ability being cast doesnt unhide. What`s wrong with my trigger?
 
Last edited by a moderator:
Level 12
Joined
Nov 3, 2013
Messages
989
target unit of ability being cast won't work after the wait. Either make a unit variable; set unitVariable = target unit of ability being cast
wait 2 sec
unhide unitVariable

If you're going to use wait instead of timer or periodic event and want the ability to work with Multiple Instances you could use custom script to have the variable be local and you won't need to do any indexing.

Also if you're doing it like this you won't see the unit inside while it's eaten. Maybe you'd rather want to have a normal Devour and after 2 sec just unload the unit instead? Then you can see the unit taking damage while it's being eaten.
 
Level 5
Joined
Jan 13, 2008
Messages
96
Spell is done. Thanks to all! I thought i have to use devour to do a spell like it's now, that`s why i asked about Devour. I realy didnt knew how hide and unhide work... Thanks again!
 
Status
Not open for further replies.
Top