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

[Trigger] How to add an explosion when unit dies from spell

Status
Not open for further replies.
Level 5
Joined
Oct 3, 2008
Messages
104
Easy. First, set a point variable called loc.
Then make the trigger as follows:

Event: A Unit Dies
Conditions:
Action:
Set variable loc = Unit - Position of Triggering unit
Special Effect - Create Special Effect Neutral Building Explosion at loc
Special Effect - Destroy last created special effect
Custom script: call RemoveLocation(udg_loc)

done


Edit: If you want it so a spell triggers this, change the event to "Unit starts effect of an ability"
Condition "Ability being cast = (insert name of spell u want)"
And in action change loc to Unit - Position of target unit of ability being cast
 
Last edited:
Level 7
Joined
Oct 8, 2008
Messages
200
Easy. First, set a point variable called loc.
Then make the trigger as follows:

Event: A Unit Dies
Conditions:
Action:
Set variable loc = Unit - Position of Triggering unit
Special Effect - Create Special Effect Neutral Building Explosion at loc
Special Effect - Destroy last created special effect
Custom script: call RemoveLocation(udg_loc)

done

Cool except is there a way to make it a specific unit?
 
Level 7
Joined
Oct 8, 2008
Messages
200
then add that to a condition

Make a condition saying:
triggering unit = (wateva unit u want here)

if u want it for a unit type, use
unit type of triggering unit = (unit type here)

Thanks dude ok I know this sound noobish but where and how do I set the point variable called LOC
 
Status
Not open for further replies.
Top