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 → Which cog do I need 2 move the trooptran in MOTSS
Which cog do I need 2 move the trooptran in MOTSS
2002-11-21, 12:52 PM #1
I should imagine theres a cog already in MOTS that I can use to move the trooptransport ship through a series of frames, but which one is it?!? I would like to be able to get on it and travel through several sectors to another place, surely this is possible.
Also is there a cog that alows me to have a ship that appears at one side of the level moves straight through it, disappears at the other end then appears back where it started and continuously cycles through this chain of events? That would be really useful. The only thing I can do at the moment is get a ship to fly 'once' when I enter a sector that means that if you miss the opportunity to jump on it you don't get another chance (that is what I want the continously flying ship for).
2002-11-21, 1:28 PM #2
Yeah, there is porblably already a cog in MotS that would do some of what you need . . . but use this one instead ...

Code:
# Generic JK/MotS TroopTran controller.
#
# 11/2002 GBK
Symbols
Message Activated
Message Arrived
Thing Tran
Int Num_frames	#Whatever it says in JED, put it here...
Flex Speed=4
Sound Start
Sound Hum
Sound Finish
Int Hum_ch=-1				Local
End
Code
Activated:
If(Ismoving(Tran)) Stop;
Movetoframe(Tran, Num_frames-1, Speed);
Playsoundthing(Start, Tran, 1, 0, 20, 0);
Hum_ch = Playsoundthing(Hum, Tran, 1, 0, 10, 1);
Stop;
Arrived:
If(Getcurframe(Tran) != Num_frames-1) Stop;
Stopsound(Hum_ch, 0.1);
Playsoundthing(Finish, Tran, 1, 0, 20, 0);
Stop;
End


The "Num_frames" variable should be set as what JED reports as the object's number of frames.


And the other one...

Code:
# 11/2002 GBK
Symbols
Message Startup
Message Arrived
Thing Ship
Int Num_frames	#Whatever is says in JED, goes here...
Flex Speed=4
Sound Hum
Template Posi=ghost		Local
Thing Pos			Local
End
Code
Startup:
Sleep(0.5);
Playsoundthing(Hum, Ship, 1, 0, 20, 0);
Pos = Creatething(Posi, Ship);
Movetoframe(Ship, Num_frames-1, Speed);
Stop;
Arrived:
If(Getcurframe(Ship) != Num_frames-1) Stop;
Sleep(1);
If(Ismoving(Ship) != 0) Stop;
Teleportthing(Ship, Pos);
Movetoframe(Ship, Num_frames-1, Speed);
Stop;
End


Same thing with the Num_frames...


Oh, yeah, credit me. [http://forums.massassi.net/html/smile.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

GBK oNline. Cogs, tuts, and total w00tage.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!