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 → Cog request
Cog request
2001-10-28, 6:11 PM #1
Could somebody make me a cog that when a SWITCH is activated, a thing moves from FRAME 0 to FRAME 1, then stays at FRAME 1 for a SPECIFIED ammount of time, then moves to FRAME 2. then sleeps at FRAME 2 for a SPECIFIED ammount of time then returns to frame 0 in the same order reversed. It needs speed for every trip, 0 > 1, 1 > 2 etc and specifiable sleep times. You will get credit in readme too [http://forums.massassi.net/html/smile.gif]
2001-10-29, 4:16 AM #2
Mmmmm. Door cogs. Mmmmmm.

 

#10/2001 GBK
Symbols
Message Activated
Message Timer
Surface Switch
Thing Object
Flex Speed0
Flex Speed1
Flex Speed2
Flex Speed3
Flex Pause0
Flex Pause1
Flex Pause2
Flex Pause3
Int Lock=0 Local
End
Code
Activated:
If((Getsenderref()==Switch)&&(Lock==0)){ Lock=1;
Setwallcel(Switch, 1);
Movetoframe(Object, 1, Speed0);
Settimerex(Pause0, 501, 0, 0); } Return;
Timer:
If(GetsenderID()==501){
Movetoframe(Object, 2, Speed1);
Settimerex(Pause1, 502, 0, 0); }
Else If(GetsenderID()==502){
Movetoframe(Object, 1, Speed2);
Settimerex(Pause2, 503, 0, 0); }
Else If(GetsenderID()==503){
Movetoframe(Object, 0, Speed3);
Settimerex(Pause3, 504, 0, 0); }
Else If(GetsenderID()==504){ Lock=0;
Setwallcel(Switch, 0); }
Return;
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-10-29, 4:20 AM #3
BTW, youll need to set the pause values higher than your desired sleep time, you need to acount for the time it takes the door to travel from frame A to frame B.



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!