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 → Password cog....
Password cog....
2002-08-17, 12:27 PM #1
Is somebody would make this cog for me, i would apreciate it. There is a door. That door is operated by a switch. In another part of the level, there are 5 surfaces, each one of them textured with numbers.mat (10 cells, #s 0-9) These number must all be on the correct cell, then the door switch will open the door. If it is on the wrong code, then the switch will just make a noise without opening the door. I should be able to specify which cell is the correct one for each surface. This is a JK/SP cog.

Basically you have to find a card that has the right code on it then enter it in the console, DF-style, to open the door.

------------------
Sanctum de la Mort
2002-08-17, 1:23 PM #2
WEE!


Code:
# DF style locked door
#
# Version 1 
#
# 08/2002 GBK - Packman573@aol.com
Symbols
Message Startup
Message Activated
Message Arrived
Thing Door
Int Lastframe=1
Flex Speed=4
Surface Switch
Surface Password0		Linkid=1
Surface Password1		Linkid=1
Surface Password2		Linkid=1
Surface Password3		Linkid=1
Surface Password4		Linkid=1
Int Correct0
Int Correct1
Int Correct2
Int Correct3
Int Correct4
Sound Wrong
Int I=0		Local
End
Code
Startup:
For(I=0;I<5;I=I+1) Setwallcel(Password0, 0);
Stop;
Activated:
If(Getsenderref() == Switch) {
If(Getwallcel(Password0) == Correct0 && Getwallcel(Password1) == Correct1 && Getwallcel(Password2) == Correct2 && Getwallcel(Password3) == Correct3 && Getwallcel(Password4) == Correct4 && Getwallcel(Switch) == 0) Call Open_door;
Else Playsoundpos(Wrong, Surfacecenter(Switch), 1, 0, 10, 0); }
If(Getsenderid() == 1) {
If(Getwallcel(Getsenderref()) == 9) 
Setwallcel(Getsenderref(), 0);
Else Setwallcel(Getsenderref(), Getwallcel(Getsenderref()) +1); }
Stop;
Open_door:
Setwallcel(Switch, 1);
Movetoframe(Door, Lastframe, Speed);
Stop;
Arrived:
If(Getsenderref() == Door) Setwallcel(Switch, 0);
Stop;
End



If it doesnt come out right, download it here.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-08-17, 6:44 PM #3
Did you test it by any chance? After an hour of testing i cant get it to work. I can change all the number cells, and the switch makes the clicking sound, but the door doesnt open, even when I entered the correct password.

------------------
Sanctum de la Mort

[This message has been edited by Dash_rendar (edited August 17, 2002).]
2002-08-18, 1:42 AM #4
Upon examining the code, I found a rather obvious error. I forgot to reset the switch on startup. [http://forums.massassi.net/html/eek.gif]


Code:
# DF style locked door
#
# Version 1 
#
# 08/2002 GBK - Packman573@aol.com
Symbols
Message Startup
Message Activated
Message Arrived
Thing Door
Int Lastframe=1
Flex Speed=4
Surface Switch
Surface Password0		Linkid=1
Surface Password1		Linkid=1
Surface Password2		Linkid=1
Surface Password3		Linkid=1
Surface Password4		Linkid=1
Int Correct0
Int Correct1
Int Correct2
Int Correct3
Int Correct4
Sound Wrong
Int I=0		Local
End
Code
Startup:
For(I=0;I<5;I=I+1) Setwallcel(Password0, 0);
Setwallcel(Switch, 0);
Stop;
Activated:
If(Getsenderref() == Switch) {
If(Getwallcel(Password0) == Correct0 && Getwallcel(Password1) == Correct1 && Getwallcel(Password2) == Correct2 && Getwallcel(Password3) == Correct3 && Getwallcel(Password4) == Correct4 && Getwallcel(Switch) == 0) Call Open_door;
Else Playsoundpos(Wrong, Surfacecenter(Switch), 1, 0, 10, 0); }
If(Getsenderid() == 1) {
If(Getwallcel(Getsenderref()) == 9) 
Setwallcel(Getsenderref(), 0);
Else Setwallcel(Getsenderref(), Getwallcel(Getsenderref()) +1); }
Stop;
Open_door:
Setwallcel(Switch, 1);
Movetoframe(Door, Lastframe, Speed);
Stop;
Arrived:
If(Getsenderref() == Door) Setwallcel(Switch, 0);
Stop;
End


It should work now. Sorry. [http://forums.massassi.net/html/frown.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-08-18, 4:20 AM #5
Hey we all make mistakes, me its usally on Rand != Rand() If you know what I'm getting at. [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
2002-08-18, 11:22 AM #6
How the hell do you string out all that cog so fast! *sniffs* i gave up trying abouta year ago!!!!

------------------
Shining Saber Productions

As a Jedi Knight your weapons are peace, knowledge and devotion. Oh yes, and your very own lightsaber!

The definition of a consultant: Someone who borrows, your watch, tells you the time and then charges you for the privilege.
Shining Saber Productions

Never be afraid to try something new. Remember, amateurs built the ark, and professionals built the Titanic.

The force is like Duct Tape - it has a dark side, it has a light side, and it binds the universe together!

If Bill Gates had a dime for every time a Windows box crashed...oh, wait a minute - he already does.

If a turtle doesn't have a shell, is he homeless or naked?

↑ Up to the top!