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 inquiry
Cog inquiry
2002-01-13, 1:29 PM #1
Is there a cog out there that is for an elevator like the one in the Fortress level in Perfect Dark? If you don't play PD, it is an elevator that goes up and down constantly, never stops and stays in one place, just up and immediately down, or vice versa. Let me know if you've ever seen this.

------------------
"Behold the Turtle. He only makes progress when he sticks his head out."
-James Bryant Conant
"Behold the Turtle. He only makes progress when he sticks his head out."
-James Bryant Conant
2002-01-13, 6:08 PM #2
Ive played PD, but I dont remimber that elevator. Nevertheless, its a cinch:

Code:
#01/2001 GBK
Symbols
Message Startup
Message Arrived
Thing Elev
Int Lastframe=1
Flex Movespeed=4.0
End
Code
Startup:
Sleep(1.0);
Movetoframe(Elev, Lastframe, Movespeed);
Stop;
Arrived:
If(Getcurfame(Elev) != Lastframe || Getcurframe(Elev) != 0) Stop;
If(Getcurframe(Elev) == Lastframe) {
Movetoframe(Elev, 0, Movespeed); }
Else {
Movetoframe(Elev, Lastframe, Movespeed); }
Stop;
End


 

There is an LEC cog that will do this, but it runs in a While(1) loop, so I tend to advise against it.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-01-13, 6:16 PM #3
GBK, just a off topic question... Why are you using stop; instead of return;?

------------------
-Hell Raiser
Something Wiccan this way comes...
"Free, your, mind." - Morpheus, The Matrix
Cogging Guru for DBZ: TDIR
-Hell Raiser
2002-01-14, 1:06 AM #4
He likes it...

------------------
http://millennium.massassi.net/ - Millennium
2002-01-14, 4:56 AM #5
it's old school.. [http://forums.massassi.net/html/wink.gif]
2002-01-14, 8:51 AM #6
I use 'Stop' because:

1) Its easier to type.

2) There is no functional difference between 'Stop' and 'Return'.

3) I can.

 

Hideki is right. I do like it... [http://forums.massassi.net/html/biggrin.gif]

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-01-14, 9:54 AM #7
Ah ok. =)
-Hell Raiser

↑ Up to the top!