Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Stop pulse if player dies
Stop pulse if player dies
2001-12-31, 4:57 PM #1
I'm trying to make the pulse stop if the player dies.
The following is within the pulse:
Code:
if(GetThingFlags(GetLocalPlayerThing()) == 0x2)
{
SetPulse(0);
Return;
}

ThingFlags 0x2 means dead.
It doesn't stop the pulse. I think the first part isn't right. Know how to fix it?
2001-12-31, 5:52 PM #2
I suppose you could always do something like this:

killed:
if(GetSenderRef() == GetLocalPlayerThing())
{
SetPulse(0);
Return;
}
2001-12-31, 7:03 PM #3
For one you need to replace the == with & ...

Secondly, just use ...

if(GetThingHealth(player) <= 0) SetPulse(0);
2001-12-31, 11:19 PM #4
It's a bug in the JK Specs. It's supposed to be 0x200.

ie:
Code:
if (GetThingFlags(GetLocalPlayerThing()) & 0x200)
{
SetPulse(0);
Return;
}


Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here

[This message has been edited by Raynar (edited January 01, 2002).]
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis

↑ Up to the top!