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 a cog
need a cog
2002-03-11, 5:06 PM #1
I need a 10 framed elevator cog
Ive moved over to JK2
2002-03-11, 5:14 PM #2
Hmm, ok. This is a modified version of a cog that can be found on my website. (link in .sig)


Code:
# Cargo elevator script.  Assignable switch/frame configuration.
#
# 11/2001 - 03/2002 GBK
Symbols
Message Activated
Message Arrived
Thing Elevator
Flex Movespeed=4.0
Surface Switch0
Surface Switch1
Surface Switch2
Surface Switch3
Surface Switch4
Surface Switch5
Surface Switch6
Surface Switch7
Surface Switch8
Surface Switch9
Int Frame0
Int Frame1
Int Frame2
Int Frame3
Int Frame4
Int Frame5
Int Frame6
Int Frame7
Int Frame8
Int Frame9
Sound Beep
Int I=0						Local
Int I2=0						Local
End
Code
Activated:
If(Isthingmoving(Elevator) != 0) Stop;
For(I=0;I<=9;I=I+1) { 
If(Getsenderref() == Switch0) {
Movetoframe(Elevator, Frame0, Movespeed);
Playsoundpos(Beep, Surfacecenter(Switch0), 1.0, -1, 4, 0);
For(I2=0;I2<=9;I2=I2+1) { 
Setwallcel(Switch0[I2], 1); } } } 
Stop;
Arrived:
For(I=0;I<=9;I=I+1) { Setwallcel(Switch0, 0); }
Stop;
End




I think the variables are fairly self-explainitory, so I will forgo the explination.

You can use more more than 1 of these cogs on the same elevator, to achieve any number of frames you need.

------------------
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-03-12, 7:12 AM #3
Well that cog looks like it stops at every frame.
I,m actully making a bus, so it needs to pass all frames then stop back at frame 0


ooh yeah were can I lean cog. [http://forums.massassi.net/html/smile.gif]
Ive moved over to JK2
2002-03-12, 8:23 AM #4
Hrm, then why didnt you say you needed a tram cog? [http://forums.massassi.net/html/confused.gif]

Code:
# 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: Skiptoframe(Plat, 0, 1000);
Stop;
End



This should do what you need. Just be sure that your first and last frames are in the exact same spot. [http://forums.massassi.net/html/wink.gif]


------------------
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-03-12, 9:25 AM #5
Thanks. I will try it.
Ive moved over to JK2
2002-03-16, 8:08 AM #6
Uhh, move, move!! You stupid bus.
Sorry your cog did not work.

Can you find out whats wrong with it.
Ive moved over to JK2
2002-03-16, 12:11 PM #7
Code:
# 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


That should fix it. If your still having problems, it is problably an installation error. Check your tram/frames, and make sure you updated the 'Lastframe' variable...

------------------
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-03-17, 5:36 AM #8
Tried it and it worked and I found out what made the other one not work a key frame cog that did not work made your cog think it was moving.

I had 8 frames and I set it to Lastframe 7
and it worked only once.
I set it to lastframe 8 and It did not move at all.
Ive moved over to JK2
2002-03-19, 7:24 AM #9
UH OH it will not work any more help.
Ive moved over to JK2
2002-03-19, 9:18 AM #10
Ok, this one works, I tested it.

Code:
# Will reset to 0 after entrance.
#
# 01/2002 - 03/2002 GBK
Symbols
Message Entered
Thing Plat
Flex Movespeed=2.0
Int Lastframe=9
INt Sec=0			Local
End
Code
Entered:
If(Getcurframe(Plat) != 0 && Isthingmoving(Plat) == 0) 
Skiptoframe(Plat, 0, 1);
If(Getcurframe(Plat) == 0 && Isthingmoving(Plat) == 0) 
Movetoframe(Plat, Lastframe, Movespeed); 
Stop;
End


Sorry about that... [http://forums.massassi.net/html/frown.gif]

------------------
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-03-20, 10:50 AM #11
I'll try it I did actually but it did not work then I thought mabey it has to do with the frames or sectors so I moved the bus but the new merged sector I put it in messed up so I will tell you the result once my sector works.
Ive moved over to JK2
2002-03-25, 2:22 PM #12
It works!!!!!!
Ive moved over to JK2

↑ Up to the top!