Name:deathspawner1
Effect: Causes the monster whose on-death script contains the following to
explode with a fireball effect and fireball damage into a different monster. For
example, you kill the Baalor, who explodes into a smaller demon.
This script can be modified to have the explosion removed and cause monsters to
raise themselves from the dead when they die.
All credit for this goes to Calidarien; I simply made a slight tweak to his
'fireball explosion on death' script.
No reflex save implimented on the explosion. If you want to add your own, go
ahead; Calidarien's updated explosion allows a reflex save.
Note that if you do not place this in the OnDeath slot, IE use it for other
things, it will explode into a fireball and create the monster of your choice.
// On death, Enemy explodes with a fireball graphic, and another enemy is
placed. This causes an effect which makes it
// seem as if the enemy literally exploded into something else, the something
else being the object type and creature model.
// All due credit goes to Calidarien for his Npc explodes script. Basically, I
just added a line to make a baddie appear.
// Another interesting use for this: Change / remove the fireball effect, and
you can make a defeated enemy 'transform' into an NPC.
// BE WARNED: In this example, the resref for our creature is coming from a
custom pallete. So you're going to have to change it.
// By FlashKnight.
#include "NW_O2_CONINCLUDE"
void main()
{
location lSource = GetLocation(OBJECT_SELF);
ApplyEffectAtLocation( DURATION_TYPE_INSTANT,
EffectVisualEffect( VFX_FNF_FIREBALL), lSource);
CreateObject(OBJECT_TYPE_CREATURE, "shfiend002", lSource, FALSE);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, 2., lSource);
do {
ApplyEffectToObject( DURATION_TYPE_INSTANT,
EffectDamage(d10(2), DAMAGE_TYPE_FIRE), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, 2., lSource))
!= OBJECT_INVALID);}