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 → Help needed
Help needed
2001-11-07, 12:47 PM #1
I'm working on a new level and I need a cog that does this. There's a locked door, and you can only unlock it with the imperial key.
I need the cog to make the door locked until a person that has the imperial key touch the door (not just running into it, I mean like activating it ). And the key will only work once and the door will lock again until they get the key and use it again. Can someone somehow make this cog for me?
Who made you God to say "I'll take your life from you"?
2001-11-07, 3:53 PM #2
...and would you like fries and a drink with that?


 

# 11/2001 GBK
Symbols
Message Activated
Message Arrived
Message Blocked
Message Timer
Thing Door
Thing Player Local
Flex Door_speed=4.0
Flex Door_sleep=4.0
Int Key_num=43
End
Code
Activated: Player = Getlocalplayerthing();
If((Getsenderref() == Door) && (Getinv(Player, Key_num) == 1)) {
Setinv(Player, Key_num, 0);
Movetoframe(Door, 1, Door_speed); } Stop;
Arrived: If(Getcurframe(Door) == 1) { Settimer(Door_sleep); } Stop;
Blocked: Movetoframe(Door, 1, Door_speed); Stop;
Timer: Movetoframe(Door, 0, Door_speed); Stop;
End


 

It works, I tested it.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-11-07, 3:57 PM #3
Ehh, figured I should tel you - the 'Key_num' variable, thats the BIN number of the required key. I have it preset to 43, the 'Imperial key', but you can set it to anything you want.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!