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 → captureThing() and killed: Not Working
captureThing() and killed: Not Working
2004-12-13, 4:58 PM #1
I'm trying to capture the event when the local player is killed. I am using this code:

However, when the local player is killed, nothing happens at all. The message is printed at startup, but nothing happens when the player is killed.

Any help? :(

Code:
symbols

...

message startup
message killed

end

code

startup:
	player = getLocalPlayerThing();
	captureThing(player);

	sleep(5);
	print("This should say this.");

	return;

...

killed:
	print("blahblah");
	call turnOff;
	
	return;

end
KOP_blujay
Just dancin'...and singin'...in the Force.
2004-12-13, 6:23 PM #2
Ive never had good luck trying to capture the player. If this is a mod, you could stick a trigger in kyle.cog...
And when the moment is right, I'm gonna fly a kite.
2004-12-13, 6:28 PM #3
It's just a level. The cog changes the camera and locks the player, but if the player dies while he is in that position, he can't move after he respawns. So I wanted the cog to reset him if he died.

BTW, gbk, please check the other thread I just posted if you get a chance.
KOP_blujay
Just dancin'...and singin'...in the Force.
2004-12-13, 6:37 PM #4
Consider just using a pulse and if(GetThingHealth(player) < 1) or if(GetActorFlags(player) & 0x200), either of those should let you know the player is dead.

QM
2004-12-13, 7:30 PM #5
Thanks, Quib, that fixed it. BTW, if you have a few min, could you check the other thread I posted?
KOP_blujay
Just dancin'...and singin'...in the Force.

↑ Up to the top!