intercepting death?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

intercepting death?

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

why not while(isalive

or while($player.health > 1

waitframe

or something
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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:
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

while(isalive $player)
{
waitframe
}

while!(isalive $player)
{
waitframe
}

$player thread become_alrightm8
end

;)
Post Reply