Heya, > When an NPC becomes a ragdoll it is essentially an independent object to the > npc and generally one that is generated client-side versus server-side. If > you are trying to remove the corpse after 5 seconds then you may need to be > looking for the ragdoll entity then. > > Chris > Thanks for the hint, but my NPC is not becoming a ragdoll. I think a ragdoll would cost too much performance as i'm working with many NPCs. That's why i only have them play simple death animations.
> Instead of removing the npc go to the client side ragdoll in > c_baseanimating and have it remove itself after 5s. If you aren't > using a ragdoll and just animations, then you need to look in > combatcharacter for a deadthink function or something similar and add > your timer there. By setting the think on your npc, you are taking > away the natural thinking process that contains the wait for death > animation completion stuff. Hope this helps. > > ~Ryan / skidz Ryan: What you described with the death-think function is exactly what i'm trying to figure out. I'm looking for what you called the "natural thinking process that contains the wait for death animation completion stuff". I need to find exactly that function, but i'm having trouble with it ;) Thanks for the hint though. Regards from Germany xs57 > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Biz > Sent: Thursday, July 02, 2009 10:41 AM > To: [email protected] > Subject: [hlcoders] Remove corpse 5s after NPC death > > Hi list, > > i've ported my mod to ob-engine and now my NPC corpse fade after 5 > seconds isn't working anymore. Does anyone have an idea what the last > function that is called after NPC death is? When i try to define a new > think-function Dying() at the end of the Event_Killed() function like: > SetThink( &Bla::Dying ); > SetNextThink( gpGlobals->curtime + 5.0f ); > > void Dying() > { > UTIL_Remove(this); > } > > This works, but my death animation won't play anymore then. That is if i > kill an NPC it just freezes and disappears after 5s. > > So i would either need a command that resumes my animation or i would > have to know which function is called after death. I've tried figuring > it out myself, but i didn't find it. > > Any help greatly appreciated :-) > > > Greets from Germany > xs57 > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

