need some help with my ondeath

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

need some help with my ondeath

Post by dragon slayer »

here is what i got

Code: Select all

function onDeath( pDead ) 
{    
     var nSpawned = SpawnNPC( "boneknight", pDead.x, pDead.y, pDead.z, pDead.worldnumber );
} 
what i want it to do is make a effect and delete the corpse when the npc spawns. i have try differant methods and failed
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

It doesn't trigger at all? The script you've got in your post there looks like it ought to spawn a boneknight when the character the script is attached to dies.

Doing something to the corpse item is harder. Don't have the code handy right now, but I'm guessing that onDeath triggers _before_ the corpse is created, allowing you to override the death if you want to (Miraculous recovery! You're not dead!).
-= Ho Eyo He Hum =-
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

yeah maybe should be onbeforedeath?
Post Reply