(Goal)When a unit dies via damage caused by either
enviroEffects: or negative health regen on its armor that unit will not trigger the
specab: 1 effect on death and explode.
If I understand correctly this occurs because the unit is not dying during a turn but instead between turns.
This got me thinking that maybe a makeshift solution could be created using a pre-primed grenade.
Fortunately
Greenscarf has posted a script that does just that:
(Thank you for sharing your script Greenscarf!)[Documentation][y-script] OXCE Script examples.(Problem)I've run into a snag, for some reason I cannot spawn a unit with a grenade using the
units: builtInWeaponSets: list.
builtInWeaponSets:
- - STR_MAGNA_BLAST_GRENADE
If someone could take a quick look at my code in the mod attached to this post and see if they can spot the problem I would appreciate it. (
TestMod.zip)
The small example mod is composed of:-
Greenscarf's scripts that auto-prime the grenade.
- A test unit that will die via decaying health on its armor.
- A test weapon to spawn the enemy unit quickly where it can easily be observed.