Blockland Forums > Modification Help
Detecting Corpses (with a raycast)
(1/1)
Amade:
I need to be able detect the body of a dead player with a raycast. I've tried using $Typemasks::CorpseObjectType and $Typemasks::PlayerObjectType but neither of these seem to detect any corpses. Is there any way to do this?
ottosparks:
I'm pretty sure a dead player is just an animation.
MegaScientifical:

--- Quote from: ottosparks on June 13, 2010, 11:52:19 PM ---I'm pretty sure a dead player is just an animation.

--- End quote ---

Death is an animation, but the body itself should have a type to be found.
ottosparks:

--- Quote from: MegaScientifical on June 13, 2010, 11:58:03 PM ---Death is an animation, but the body itself should have a type to be found.

--- End quote ---
Hrm. Yeah.

I vaguely remember stumbling upon something like that once.
Space Guy:
Checking against $TypeMasks::CorpseObjectType should work if you had an ID to the player while they were alive, killed them and checked getType() before the body disappeared.

It may be returned in a box/radius search but I'm not sure, it won't show up from a raycast since it has no collision.
Navigation
Message Index

Go to full version