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 → CTF Flag question for all ye wittle coggers
CTF Flag question for all ye wittle coggers
2001-01-24, 11:48 AM #1
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
http://www.jedilegacy.net/gonk/
2001-01-24, 4:57 PM #2
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
-Hell Raiser
2001-01-25, 4:22 AM #3
Good to know! [http://216.105.160.32/html/smile.gif] Thanks! *jumps up and down cheering*
http://www.jedilegacy.net/gonk/
2001-01-25, 5:25 AM #4
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)
{
//return flag
}
}


------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited January 25, 2001).]

↑ Up to the top!