HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

explode on death

02-01-2004, 01:57 AM#1
SuperPeon
how can i make a unit explode on death?
02-01-2004, 02:07 AM#2
johnfn
alright, this might be ez or hard, depending on if the easy version works... ;)

EZ version (might not work)
Events:
Unit - Specific Unit Event: <pick unit> dies
Conditions:
none
Actions:
Unit - Explode(Triggering Unit)

im only unsure if (triggering unit) is the right thing. anyway, if that doesnt work cause its already dead, try this

Event:
Unit - Specific Unit Event: <pick unit> is attacked
Unit - health: <pick unit>'s life becomes less then 10
(so the next attack he will die)
Conditions:
none
Actions:
Unit - Explode(Triggering Unit)

have fun :ggani:
02-01-2004, 02:15 AM#3
LegolasArcher
why dont you have a generic unit event instead? That would cause all units to explode on death
02-01-2004, 02:20 AM#4
SuperPeon
can i make it so the death animation is explode. i tryed the first one and it didnt work... im doing this for a land mine and i want to detonate it and ahve it explode. i have it working where i lay the mine and then press detonate, an ability , then it just like dies and slides underound and dissapears. but it does hurt the things around it.
02-01-2004, 02:48 AM#5
johnfn
Hmm, lets try this again...

first make a reigion centered around the bomb.
Event:
you use the detonate ability (i dont know this trigger, youll have to find it)
You can also have an item that sets off the bomb, and have the bomb hold it, but agh, thats too many complications...
Action:
Pick Every Unit in (units in(bomb region <gen>)) and do(Explode(picked unit))

Another option, if you want to have bombs be made during the game is to have a variable as a reigion, and center it around the exploding bomb and then kill all the units in the reigion. The reigion is basically the blast radius of the bomb.

I hope it works this time.
02-01-2004, 03:17 AM#6
WTFish
Hmm I think that mines have the ability that does damage upon death( If it does, delete all parts with square brackets around them) , all you would need to do would be:

Event:
A unit finishes casting an ability

Condition:
Ability being cast equal to detonate

Actions:

Unit group: Pick every unit in: units owned by (owner of casting unit) of type (land mine) and do unit: kill (picked unit)
[ Unit group: Pick every unit within XXX of (dying unit) and do: unit explode (picked unit) ]

Maybe this will work, I'm not sure.
02-01-2004, 04:03 AM#7
DoCa-Cola
I think there is a trigger somewhere that sets units to explode on death. so if there is, you would need this:

Code:
Event:
  Map Initialization (Or Whatever)
Conditions:
  If you want them, put them, doesnt matter
Action:
  Pick every unit and do (Make (Picked Unit) Explode on death)