ON DEATH
#ON_DEATH Conditions
ON_DEATH is a condition used in RTS that causes scripts to activate upon the death or removal of a specified thing or object. This can be used not only for monsters, but players, decorations or a weapon if you see fit to do such things. RTS enhances DDF even more by adding certain conditions for scripts.
Usage: ON_DEATH <ThingID> [count]
Your code will look like this: ON_DEATH Mancubus 4
Description: This will cause a trigger to not activate until all things of <ThingID> are killed or removed from the map.
Let's say you wanted a sector to rise after killing Demons within the radius of a trigger script. You'd assign the Demons to the condition of death.
Details: <ThingID> can be the name or number from THINGS.DDF, like IMP or 3001.
The optional [count] is a numerical value which causes a counter based on how many <ThingID> are left to kill. If used, the values should be greatest to lowest as you read down your script.
Example:
START_MAP MAP01
RADIUS_TRIGGER 0 0 -1 ON_DEATH IMP 1 // runs when only 1 Imp is left alive TIP "Only 1 Imp left!" END_RADIUS_TRIGGER
RADIUS_TRIGGER 0 0 -1 // since we don't specify a count, ALL imps must be killed ON_DEATH IMP TIP "All Imps killed!" END_RADIUS_TRIGGER
END_MAP