I'm working on a new class for survivors. Vampire class. It will be able to suck blood from dead zombies(redead?).
Anyway, I want to know how to check if a player is touching an enemy players corpse.
Thanks Barata...
Code:
if(level.players[1] isTouching(level.players[2]))
????
Lemon, try to do some research before asking on ItsMods. You could just have ctrl+f'd on the function list.
there is a "isTouching" function???
lol
I know the istouching function, what I want to learn is the corpse.
if(self isTouching(level.players[2].corpse))
???
(06-06-2012, 16:08)Lemon Wrote: [ -> ]I know the istouching function, what I want to learn is the corpse.
if(self isTouching(level.players[2].corpse))
???
I think a ragdoll is created in the OnPlayerKilled event, look through it.
It's called ".body" in MW2, and it's probably the same in cod4-BO.
Code:
for ( i = 0; i < level.players.size; i++ )
{
if ( self isTouching(level.players[i].body) && level.players[i].team == "axis" && self GetStance() == "prone" )
{
self thread doSuck();
I've tried the the code abovei but it doesnt check if I'm touching the body or not, it only checks the stance properly.