View Full Version : CTF Flag question for all ye wittle coggers
Well, let's just say I've got a bit of an interesting question. What I'm looking to do is have a flag over a nice pit or something, that slowly kills the player. (As in toxic waste or something) But the problem with that is, if he dies down there, the flag stays there with him.... sooo.. is it possible to have the flags return to their spawns if they cross into a certain sector or over a certain adjoin? I know they do this when someone dies in a pit, so I guess it's the same principle... If someone could write me up a simple cog that'd do this, I'd be much appreciative. http://216.105.160.32/html/smile.gif Thanks for the help!
--Gonk
Hell Raiser
01-24-2001, 07:57 PM
Well, the CTF code returns the flag after a certian ammount of seconds when the carrier dies, so it's not really needed.
------------------
-Hell Raiser
"I am not defeated so easily!"
Co-staffer of Rbots (http://rbots.massassi.net/)
Good to know! http://216.105.160.32/html/smile.gif Thanks! *jumps up and down cheering*
Hideki
01-25-2001, 08:25 AM
But if you want to return it soon enough, maybe capturing the flag in the cog might do it.
In the ctf cog, in the startup
CaptureThing(flag); //and mask the flag 0xffffff in the symbols(or something, look in the darkjedi cogs on how they mask "darkjedi" var
add a damaged message in the ctf cog.
if(GetSourceRef() == flag)
{
if(GetAttachFlags(flag) != 1) //return it
}
I guess... but they might not recieve a damage since it passes all conflicts.
In that way, just let the cog know which sector is the damaging sector and return it when the flag is in there.
sector sec0
sector sec1
sector sec2
etc
etc
int maxSec=3 local
add these messeges when the flag gets dropped.
for(i=0; i<=maxSec; i++)
{
if(GetThingSector(flag) == sec0[i])
{
//return flag
}
}
------------------
http://millennium.massassi.net/ - Millennium
[This message has been edited by Hideki (edited January 25, 2001).]
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.