• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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