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 → Problem with cog....
Problem with cog....
2003-05-26, 11:07 AM #1
This was a cog that was made for me that is supposed to open a door, and leave it open when 3 surfaces and 1 thing have all been activated. The door however, does not open.

Code:
#12/2002 GBK
Symbols
Message Activated
Thing Door
Surface Switch0		LinkID=1
Surface Switch1		LinkID=1
Surface Switch2		LinkID=1
Thing Switch3
Flex Speed=4
Sound Beep
End
Code
Activated:
If(Getsenderref() == Door || Getcurframe(Door) != 0 || Ismoving(Door)) Stop;
If(GetsenderID() == 1) {
Setwallcel(Getsenderref(), 1 - Getwallcel(Getsenderref()));
Playsoundpos(Beep, Surfacecenter(Getsenderref()), 1, 0, 20, 0); }
Else { Setthinguserdata(Switch3, 1 - Getthinguserdata(Switch3));
Playsoundthing(Beep, Switch3, 1, 0, 20, 0); }
If(Getwallcel(Switch0) == 1 && Getwallcel(Switch1) == 1 && Getwallcel(Switch2) == 1 && Getthinguserdata(Switch3) == 1) Movetoframe(Door, 1, Speed);
Stop;
End


------------------

Restless 2

Sanctum de la Mort
2003-05-26, 11:10 AM #2
You must be doing something wrong. Thats one of GBK's (horrid setup) cogs, it works. He makes sure it works, parsec and sometimes tests. The code is clean by my perception. So therefore you must be inplementing it wrong.

------------------
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-26, 11:52 AM #3
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Descent_pilot:
Thats one of GBK's (horrid setup) cogs...</font>


I find your lack of faith disturbing. /me whips out a voodoo doll of DP and rips its head off.


Try this one...
Code:
#05/2003 GBK
Symbols
Message Activated
Thing Door
Surface Switch0		LinkID=1
Surface Switch1		LinkID=1
Surface Switch2		LinkID=1
Thing Switch3
Flex Speed=4
Sound Beep
End
Code
Activated:
If(Getsenderref() == Door || Getcurframe(Door) != 0 || Ismoving(Door)) Stop;
If(GetsenderID() == 1) {
Setwallcel(Getsenderref(), 1 - Getwallcel(Getsenderref()));
Playsoundpos(Beep, Surfacecenter(Getsenderref()), 1, 0, 20, 0); }
Else If(Getwallcel(Switch0) == 1 && Getwallcel(Switch1) == 1 && Getwallcel(Switch2) == 1) { 
Movetoframe(Door, 1, Speed); Playsoundthing(Beep, Switch3, 1, 0, 20, 0); }
Stop;
End


I must have been drunk, or something, when I did that first one.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-05-26, 6:07 PM #4
I know why. Whenever you use GetWallCel() like that, there's always going to be problems. I can almost guarentee it. Thats why. I also have anti-GBK-voodoo-doll cogsetup field around me. edit - What's lack of faith, I'm just stating the plain and obvious fact that its hard to read and comprehend.

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

The Magician Saber System.

[This message has been edited by Descent_pilot (edited May 26, 2003).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!