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

I need to create a temp Illusion

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
i need to just create a copy unit for just a sec and when it dies have no death or noticeable explosion, a poof like when the illusions die would be ok though i guess

  • Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Custom script: call UnitAddAbility(GetLastCreatedUnit(), 'Aloc')
i know there is leaks in this, its just for fast testing

main prob is when that timer ends the unit dies or building explodes etc.. i want it to just disappear when its time runs out
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Try

Custom script: local unit u
Create 1 unit...
Add locust
Add 2 second exp time
Custom script: set u = bj_lastCreatedUnit
Wait 1.5 seconds // must be a bit shorter than the expiration time
Custom script: set udg_unitVariable = u
Unit - Hide unitVariable
Create special effect at position of unitVariable
Custom script: set u = null
 
Status
Not open for further replies.
Top