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 → Need another cog before i release
Need another cog before i release
2002-04-02, 1:30 PM #1
Well, actually a modifaction. Just make this cog so after it jumps back to frame 0, it has a specifiable timer before it can be started up again. This is because when players are riding it, and it stops, it starts again before they can get off because when they walk on it to jump off the side, it will start moving again.

# Resets to frame0 after arrival.
#
# 01/2002 - 03/2002 GBK
Symbols
Message Entered
Message Arrived
Thing Plat
Flex Movespeed=2.0
Int Lastframe=9
End
Code
Entered: If(Isthingmoving(Plat) != 0) Stop;
Movetoframe(Plat, Lastframe, Movespeed); Stop;
Arrived: If(Getcurframe(Plat) != 0) Skiptoframe(Plat, 0, 1);
Stop;
End

------------------
The truth is out there, but so are lies.
2002-04-02, 3:51 PM #2
# Resets to frame0 after arrival.
#
# 01/2002 - 03/2002 GBK
Symbols
Message Entered
Message Arrived
Thing Plat
Flex Movespeed=2.0
Int Lastframe=9
End
Code
Entered: If(Isthingmoving(Plat) != 0) Stop;
Movetoframe(Plat, Lastframe, Movespeed); Stop;
Arrived: If(Getcurframe(Plat) != 0)Skiptoframe(Plat, 0, 1);
Sleep(10);
Stop;
End

I added sleep(10) after it stoped so that it would have to wait 10 seconds before the cog restarts.

Change the sleep number to how many seconds you want it to wait.

If it does'nt work, post that it didn't.

[This message has been edited by LHarm (edited April 02, 2002).]
Ive moved over to JK2
2002-04-02, 5:01 PM #3
Umm, no, that isnt going to work reliably.

Code:
# Resets to frame0 after arrival.
# 
# 01/2002 - 04/2002 GBK
Symbols
Message Entered
Message Timer
Thing Plat
Flex Movespeed=2.0
Int Lastframe=9
Flex Sleeptime=5.0
Int Allow=0			Local
End
Code
Timer: Allow = 0; Stop;
Entered: If(Allow != 0) Stop;
If(Getcurframe(Plat) != 0 && Isthingmoving(Plat) == 0) {
Skiptoframe(Plat, 0, 1); Settimer(Sleeptime); Allow=1; }
If(Getcurframe(Plat) == 0 && Isthingmoving(Plat) == 0) 
Movetoframe(Plat, Lastframe, Movespeed); 
Stop;
End


It works, I tested it.

------------------
Success is the inverse relationship between effort, gain, and loss.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-04-03, 5:57 AM #4
Ooh uh my bad
Ive moved over to JK2

↑ Up to the top!