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 → Does anyone see anything wrong with this?
Does anyone see anything wrong with this?
2002-03-01, 11:43 AM #1
This should detach thing flag from player if he dies, and if he is in team 2, but it does nothing, anyone know why?

[note: this is a part of a cog!]

Code:
killed:

if(GetPlayerTeam(GetSenderRef()) == 2)
{
DetachThing(flag);
SetPulse(0);
print("w00t");
SetPlayerTeam(player, 1);
SetThingModel(player, red);
captured = 0;
flagcarrier = -1;
}

Return;


------------------
Life is like... skating... yeah, skating is a good example. You see someone skating and think "Hey, that looks like fun and easy!". You go and buy a skateboard and try, you get a few broken bones, asphalt-face and stuff... But hey, i'm not the one who gets hurt!

[This message has been edited by CaveDemon (edited March 01, 2002).]
Last edited by mb; today at 10:55 AM.
2002-03-01, 12:38 PM #2
You forgot the parenthesis for 'Getsenderref()'. [http://forums.massassi.net/html/tongue.gif]

------------------
Success is the inverse relationship between effort, gain, and loss.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-03-01, 12:40 PM #3
put that into the killed message in the kyle.cog, and then replace GetSenderRef with player, that should do it
roses are red, violets are blue, I am schizophrenic, and I am too!

↑ Up to the top!