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 → A Curtain Cog
A Curtain Cog
2003-05-20, 5:09 PM #1
My friend needs help with a cog from a level and I know nothing of them. Anyways, it's Darth Gnarl using a Jeff Walters cog and here's the cog:

code

startup:
SetWallCel(decider,0);
return;

# ........................................................................................

activate:
if ((GetWallCel(decider) == 0) && (GetSenderId() == 1))
{ SendTrigger(-1, 600000 + curtID, decider, 1, curtainwav, 0);
//Open curtains
}
else if ((GetWallCel(decider) == 1) && (GetSenderId() == 1))
{ SendTrigger(-1, 600000 + curtID, decider, 12, curtainwav, 0);
//Close curtains
}
return;

He said the problem is that the curtain opens but doesn't close... and that he can't figure out what the decider is. I can't help so I came here. Thanks.

Edit: It's a Jeff Walters cog.

------------------
Cower before my blades as I manipulate time to slaughter your pitiful, mortal body.

[This message has been edited by sHRiKE (edited May 20, 2003).]
Cower before my blades as I manipulate time to slaughter your pitiful, mortal body.

sHRiKE or Mith
2003-05-21, 12:00 PM #2
The other cog is requested. So that way we can see the whole picture. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-22, 3:56 AM #3
ye, and the symbols section would be nice. :P

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-05-23, 11:48 AM #4
That's all I was given... *sigh* I have no idea what you guys are requesting.

------------------
Cower before my blades as I manipulate time to slaughter your pitiful, mortal body.
Cower before my blades as I manipulate time to slaughter your pitiful, mortal body.

sHRiKE or Mith
2003-05-23, 11:49 AM #5
ask him for the simbols section, and the "triggered" cog. he will understand

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-05-23, 5:43 PM #6
Yes, give us the triggered cog and use code tags!

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-05-24, 11:36 AM #7
hey sorry this is the cog:
# Jedi Knight Cog Script
#
# Curt_Ser.cog
#
# Draws curtains. C/S version, Server side
#
# [JW]
#
# Copyright (c) Jeff Walters 1998

symbols

message activate
message startup

surface blind1 linkid=1
surface blind2 linkid=1
surface blind3 linkid=1
surface blind4 linkid=1
surface remains1 linkid=1
surface remains2 linkid=1
surface remains3 linkid=1
surface remains4 linkid=1
surface decider

int curtID

sound curtainwav

end

# ========================================================================================

code

startup:
SetWallCel(decider,0);
return;

# ........................................................................................

activate:
if ((GetWallCel(decider) == 0) && (GetSenderId() == 1))
{ SendTrigger(-1, 600000 + curtID, decider, 1, curtainwav, 0);
//Open curtains
}
else if ((GetWallCel(decider) == 1) && (GetSenderId() == 1))
{ SendTrigger(-1, 600000 + curtID, decider, 12, curtainwav, 0);
//Close curtains
}
return;
end
and this is the client:
# Jedi Knight Cog Script
#
# Curt_Cli.cog
#
# Draws curtains. C/S version, Client side
#
# [JW]
#
# Copyright (c) Jeff Walters 1998

flags=0x240

symbols

message trigger

int curtID

surface blind1 linkid=1
surface blind2 linkid=1
surface blind3 linkid=1
surface blind4 linkid=1

end

# ========================================================================================

code

trigger:
if(GetSourceRef() != 600000 + curtID) Return;

if(GetParam(1) == 1)
{
PlaySoundPos(GetParam(2), SurfaceCenter(blind1), 1.0, -1, -1, 0 );
SetFaceGeoMode(blind1,0);
SetFaceGeoMode(blind2,0);
SetFaceGeoMode(blind3,0);
SetFaceGeoMode(blind4,0);
SetAdjoinFlags(blind1,2);
SetAdjoinFlags(blind2,2);
SetAdjoinFlags(blind3,2);
SetAdjoinFlags(blind4,2);
SetWallCel(GetParam(0),1);
// Curtains open
}
else if (GetParam(1) == 12)
{
PlaySoundPos(GetParam(2), SurfaceCenter(blind1), 1.0, -1, -1, 0 );
SetFaceGeoMode(blind1,4);
SetFaceGeoMode(blind2,4);
SetFaceGeoMode(blind3,4);
SetFaceGeoMode(blind4,4);
ClearAdjoinFlags(blind1,2);
ClearAdjoinFlags(blind2,2);
ClearAdjoinFlags(blind3,2);
ClearAdjoinFlags(blind4,2);
SetWallCel(GetParam(0),0);
// Curtains closed
}
return;
end


------------------
2003-05-24, 11:39 AM #8
And like shrike said I can get it to open but not close and I put the decider surface everywhere around it hahaha I dont know it I need some kind of different architecture, and I dont know cog language at all never studied "c"

------------------
2003-05-24, 12:42 PM #9
does the decider surface texture have more than one cel to it?

the first cog needs it to have more than one cel for it to tell whether to open or close the curtain.

i have no idea what the 'remains' surfaces up in the symbols of the first cog are for, besides maybe just being more surfaces that you could activate.

------------------
Famous last words - "It seemed like a good idea at the time."

[This message has been edited by DSLS_DeathSythe (edited May 24, 2003).]
Famous last words - "It seemed like a good idea at the time."
2003-05-24, 2:05 PM #10
OMFG, it burnes, oh the pain. No code tags, ahhh, no arrays, that isn't soo bad. Ahhh.

The problem is this, GetWallCel(), I don't like it, always gave me problems. Best thing to do is to have another local varible that controls if its open (1), or closed (0). You also don't need the surfaces blind and remains. This is all for the first cog.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!