trying to create a farm area where the cows and other animals are dead on spawn.
Any idea how to do this?
Many thanks in advance.
trying to create a farm area where the cows and other animals are dead on spawn.
Any idea how to do this?
Many thanks in advance.
void main()
{
SetIsDestroyable(FALSE, FALSE, FALSE);
ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(),OBJECT_SELF));
}
Make sure they are also flagged as Leaves Lootable Corpse.
And i put this as a script onspawn?
Yes.
ooo you are a diamond, tyvm
There is already a script in the game that does this. No need to write a new one. The script is called X0_C2_SPWN_CORP. If you look in X0_I0_CORPSES you’ll find a whole slew of functions to make a variety of corpses from creatures.
Another good thing about biowares script is it applies a few hundred damage as well as the death effect, making the script generally applicable to spawning corpses from anything, rather than only from things that are not immune to death effects (say you want an undead or construct lying around, for example.)
you guys rock. sorry for lateness of reply.