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

Special Effect Problem

Status
Not open for further replies.
Level 2
Joined
Aug 2, 2006
Messages
19
I made a trigger that:
1) creates a special effect of a barrel of explosive everytime a unit die
2) at the same location after 5 seconds damage is dealt to the area
3) Remove Special Efeect

...the problem is i dunno how to set the removal of the speial effect because if i set it to remove "last created sp" then it might not remove the rite one due to the 5 seconds wait and other units might die during the 5 seconds.
 
Level 2
Joined
Feb 5, 2007
Messages
29
But in those 5 seconds, the trigger might set another SFX and then the trigger will destroy the wrong SFX. Or am I going crazy here?
 
Level 11
Joined
Jul 12, 2005
Messages
764
But in those 5 seconds, the trigger might set another SFX and then the trigger will destroy the wrong SFX. Or am I going crazy here?
Yes, this is not MUI. But you can implement a little custom script:
  • Custom script - local effect sfx = null
  • Special effect - Create SE .. blahblah
  • Custom script - set sfx = bj_lastCreatedEffect
  • //Do actions here
  • Wait 5 seconds
  • Custom script - call DestroyEffect(sfx)
This is fully MUI.
One thing is important: The first line you see above MUST be the first of your trigger too! Start your trigger with
  • Custom script - local effect sfx = null
 
Status
Not open for further replies.
Top