Does decay time make a difference and what are the limits?

I wanted to have some npc’s that decay instantly but setting decay to 50, which is 1% of the normal, does nothing. So is there a “sweet spot” for rapid decay and does the time make a difference because it all seems the same however low I go and they still fall on the floor and slowly disappear.

Not entirely necessary but can you make them explode or do some effect instantly and therefore not decay at all ?


Now, this is something I wanted to add as well, and have now done so. HOWEVER, it can be quite complicated subject to whether the creature has anything you want the player to pick up before they fade or whatever effect you want to use.

All I can say at this stage (so as not to muddy the water if others can give you an easier response), is that you could download and check out my module to see how I handled it. However, maybe there is an easier option someone else will come back with.

P.S. I use a trick with scaling to make it appear like instant gone (without fade).

1 Like


// 'od_obliterate'
    extra script for OnDeath event.

    Set a string variable on a creature


    and in the creature's OnDeath handler make sure it has

        string sScript = GetLocalString(OBJECT_SELF, "DeathScript");
        if (sScript != "")
            ExecuteScript(sScript, OBJECT_SELF);

void main()
    // do explosion effect here if wanted.

    SetScriptHidden(OBJECT_SELF, TRUE);

But like Lance says, if you want drops that’d require a bit of extra code …


Sounds like all went well with KevLs script … :+1:

As you just need death, then my comments not relevant. :slight_smile:

You’re welcome. It gets rather complicated when trying to add drops and effects … so no problem. I also misunderstood that you had not wanted them to die - my bad.

Lance_Botelle and kevL_s… So I take it as a no you can’t just speed up decay time :sob:

I’m not interested in dropping items with these creatures the whole point is that you can’t kill them they just vanish so kevL_s’ script should do the trick…

kevL_s… It did ! I tested it half way through writing this and it’s quite amusing to watch really, there’s a bit of a blood splat and a shadow left disappearing but the body vanishes. That’ll do for me so once again many thanks and you’re heading to the templates again !

Lance_Botelle… Thanks for the idea but I’m not touching it now and haven’t added anything to the death script as I said these creatures just vanish, mainly because I don’t want them to die.


ps. don’t delay stuff in an OnDeath script… (unless it’s Assigned to another owner like the module-object)

1 Like

Lance_Botelle… It did indeed and I feel a lot better without leaving more bodies all over the place, it’s really not good for the environment !