Detect when dead..

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
legendcf
Private
Posts: 3
Joined: Tue Jan 03, 2006 7:24 pm

Detect when dead..

Post by legendcf »

Hi, How could i detect when someone is killed?

Say if they press a trigger & it sets them to glow & thy Suddenly get shot how could i set it back?
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

put this around your glowy part of the script.

Code: Select all

while(isAlive local.player)
{
     //glow
}
make sure local.player is defined.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Code: Select all

glowthread:

local.player = parm.other

while(isAlive local.player)
{
     local.player light 1 0 0 50 // Red Green Blue GlowSize
     wait 1
}

local.player light 0 0 0 0

end
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

or

Code: Select all

glowthread: 

local.player = parm.other 

local.player light 1 0 0 50 // Red Green Blue GlowSize 

local.player waittill death

local.player light 0 0 0 0 

end
Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

bdbodger wrote:or

Code: Select all

glowthread: 

local.player = parm.other 

local.player light 1 0 0 50 // Red Green Blue GlowSize 

local.player waittill death

local.player light 0 0 0 0 

end
nein.

dont think so, i may be wrong but
bdbodger wrote:

Code: Select all

local.player waittill death
end
doesnt exist
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

the "death" event doesn't exist for players. which is why you need to use the IsAlive check in a loop, for some reason the devs only put some things like death and saydone in for the AI.
Last edited by lizardkid on Thu Jan 19, 2006 11:23 am, edited 1 time in total.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

ah ok I thought it worked for players too .
Image
Post Reply