Page 1 of 1

intercepting death?

Posted: Tue Mar 08, 2005 4:56 am
by lizardkid
i'm making a squad-based mod with a ton of AI and player features, one of them is that when you die, you take over a squadmate's body.

i've got it all worked out except for this, i can't figure out a way to have a script tell the game not to have the player die and end the game. i havent tried much, but nothing has worked. all i tried was $player dog at $player waittill death... dunno if it even counts $player waiting til death.

btw this is an SP toolset thing, a buncha scripts that can be called via script in an SP level, so dont worry about MP constraints.

Posted: Tue Mar 08, 2005 9:24 am
by Elgan
why not while(isalive

or while($player.health > 1

waitframe

or something

Posted: Tue Mar 08, 2005 9:37 am
by lizardkid
no no no, i dont need it while he's alive, i need it when he dies.

-player dies
-any squad members left? if so...
-switch the player's health/gun/origin/angles/grenades to that of the nearest friendly (i have this covered, just giving background)
-player should keep going with this new set of stats

what i'm trying so far is getting the player to die, then i'm trying to sort of ressrect him or something, like after he dies to stop the death cycle and fullheal or something.

it's too late for me to experiement more... :roll::roll:

Posted: Tue Mar 08, 2005 9:54 am
by Elgan
while(isalive $player)
{
waitframe
}

while!(isalive $player)
{
waitframe
}

$player thread become_alrightm8
end

;)