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

[Spell] how to properly delete unit?

Status
Not open for further replies.
Level 5
Joined
Jan 2, 2013
Messages
84
so what I did want was to caste a spell, like battle roar, then create a unit to caste a spell to that caster and delete the unit. and im trying to make it mui. what I did was something like this, which I don't even know if its mui

Untitled.png


shatter is battleroar and inner fire is to be cast to the caster. the inner fire didn't work.

edit:what worked was if I disable to action to remove the last creasted unit. everything works

and is everything mui?lol
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
I am not 100% sure about this, but you already add a 2.00s expiration timer to the unit, so it might already be removed internally.

If I am wrong, you probably need to use a local variable with custom script lines.

Custom script : local unit u

(before the Unit - Create 1 Dummy.... line)

Custom script : set u = bj_LastCreatedUnit

(Just after that Unit - Create 1 Dummy.... line)

Then replace the last line with a 2.0s Wait and then this :

Custom script : call RemoveUnit(u)
 
Status
Not open for further replies.
Top