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 → 'nother ccog request.
'nother ccog request.
2002-02-03, 11:40 AM #1
Ok this is a cog where, when you step on a thing, it moves through frames 1-9. Frame 1 is where it is currently, where it stops. It goes through all the frames, but frame 9, the last frame, is the same as frame 1, the forst one. It starts at frame one, when you step on it, it goes through all teh frames and when it hits frame 8 it goes back to frame one (frame 9. BUT, it doesnt go BACK through them all, it just runs through them all one time. Understand?
2002-02-03, 2:25 PM #2
Not tested, but should work.

Code:
# Simple script to move an object through a number of frames upon touch.  
# Resets to frame0 after arrival.
# 
# 01/2002 GBK
Symbols
Message Entered
Message Arrived
Thing Plat
Flex Movespeed=2.0
Int Lastframe=9
Int L=0			Local
End
Code
Entered: If(Isthingmoving(Plat) != 0 || L != 0) Stop;
L=0; Movetoframe(Plat, Lastframe, Movespeed); Stop;
Arrived: Skiptoframe(Plat, 0, 1000);
Waitforstop(Plat); L=0; Stop;
End



Credit me... [http://forums.massassi.net/html/wink.gif]

------------------
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!