Game Development Community

Movers for TGEA 1.8.1 - Moving platforms the player can ride

by Nicolai Dutka · 05/05/2009 (9:04 pm) · 13 comments

This resource was originally written by Ramen-sama and modified by Picasso to work with TGEA 1.8.1. The original resource can be found here:
Platform Players Can Ride Version 1.1

This is designed to be a "drag and drop" mod. All you have to do is open the zip archive, and drag/drop the folders into the correct locations using a vanilla copy of TGEA 1.8.1, compile your engine code, and you are good to go!

If you don't have a vanilla copy of TGEA 1.8.1, I HIGHLY recommend using a tool such as WinMerge to combine this resource with your engine code.

PLEASE make a backup of your engine code before attempting this! I am not responsible for anything that could happen if you don't...


Once your engine has compiled and your scripts have been added to the game folder, you are ready to create a 'mover'.

How to add the mover to a level and use it:
1. Open your *.mis file, open the Editor (F11), and open your Mission Inspector (F4)

2. Click: Mission Objects->System->SimGroup

3. Name your SimGroup: movers

4. Click: Mission Objects->Mission->Path

5. Give your Path a unique name such as: Path1

6. Click: Mission Objects->Mission->PathMarker

7. Give your new marker a unique name such as: Path1Node1

8. Create as many new PathMarker as you need for this path. The fastest way is to hold shift, and move a node along a specific X or Y axis. Be sure to rename the new node!
Path1Node2, Path1Node3, etc

NOTE: The mover can be told to move from one node to the next and stop, or can be looped to run a full path between all your nodes. It can be told to pause at each node or do the whole path in one continuous, linear motion. Things like wait times, movement speeds, etc, can all be adjusted. The mover can also move backwards and can be told when to move forward and when to move backward along a path. Movers can travel through midair and can run ANY path you give it.

9. Once you have all your PathMarker in place, go back to the Mission Inspector, expand “MissionGroup”, and find your path in the list.

10. Click on EACH of your PathMarker and drag/drop them ONTO your path in the Mission Inspector. The first time you do it, the icon for your path turns into a folder. This allows you to add all your PathMarker to that specific path. You can also do this via console command: movers.add(Path1Node1)

11. Once all PathMarker have been added to their corresponding path, open up your console by pressing: ~

12. And run the following command: makeMover(%pathName)

13. %pathName should be equal to the name you assigned in Step 7.

Example: makeMover(Path1)

14. Enjoy!


And now, for the download link:
PathShape for TGEA 1.8.1

#1
05/05/2009 (9:23 pm)
Wonderful! Great work Picasso, Nicolai, and of course Ramen-sama.
#2
05/05/2009 (11:50 pm)
Dropped right in and worked with my OLD TGE scripts. Saved me allot of time doing the port and debugging myself. Once more a big

thank you guys!

#3
05/06/2009 (2:29 am)
Holy cow, I went to Chisago Lakes High School! Small world!
#4
05/06/2009 (3:13 am)
I noticed something very interesting...

I put a mover in my level and jumped on it, standing right on the edge. Then, I let the game just sit there for about 20 minutes to see if it would crash.

It did not crash, but I noticed the player VERY slowly changing position until he eventually fell off the mover platform.

I jumped back on standing on the edge and let it go another 20 minutes and he fell off again...

40 minutes in total, no crash. The player 'shift' is BARELY noticeable and I highly doubt a player will stay on a mover for 20 minutes, but I thought it worth mentioning. ;)
#5
05/06/2009 (8:55 am)
A possible bug in bitstream,there is "out of bounds" on preload.

EDIT:

OK,found it.
I create a simple function:

function doPathShape() {
    %a = new PathShape() {
    dataBlock = LoopingShape;
    position = "488.859 728.019 151.687";
    };
	
  // give it a path to follow:
  %a.followPath("MissionGroup/Path");
  // cleanup
  MissionCleanup.add( %a );
}

Then in game.cs, in bottom of GameConnection::onClientEnterGame(%this)
use
doPathShape();

Reload now is good.
#6
05/17/2009 (10:17 am)
Download link is invalid.How it can be. HELP.
#7
05/17/2009 (11:51 am)
Wonderful! Great work.
#8
05/30/2009 (10:52 pm)
Hey there, I'm sure I've just installed this wrong, but when I get to the final step "makeMover(Path1)" it shoots back "<input> (0): Unable to find function makeMover". I followed the instructions to the letter.

Now, is it possible I missed something on the install? There were three folders unzipped: GameFolder, SceneGraph, and T3D. Inside GameFolder there was a folder labeled scriptsAndAssets which I copied into my game folder. Where, if anywhere, do the other 2 folders go?

Thank you for this wonderful resource, once I get it working it should be fantastic.
#9
06/02/2009 (7:45 am)
Copy pathshape.cs in your server/scripts folder.
In game.cs exec the file.

In spacesuit.cs you need only:

function Armor::onMovableSurface(%this,%obj,%col)
{
 error("i'm on Pathshape! :"@%col);
if (%col.getClassName() $= "PathShape") %col.attachchild(%obj);
}

And don't forget to register Armor:
className = Armor;
#10
08/15/2009 (8:48 am)
@Nicolai,

The download link is broken. If you need I can spare my web server space for this resource.
#11
08/30/2009 (12:30 am)
a quick google for the file name turns it up here: http://torque.abigholeintheweb.com/public_system/useruploads/PathShape_TGEA_1.8.1.zip but i have no idea what that system is, so use at yer own risk.
#12
09/06/2009 (11:38 pm)
I'm getting a strange result where my player actually seems to be ahead of the platform. I have a vertical platform and while going up, the player floats above it, while going down the player sinks inside it. It's also quite jittery. Any ideas?
#13
11/06/2009 (10:51 pm)
Tyler,see the new resource documentation for T3D beta5.
I think you have network related problems.
This movable platforms "eat" a lot of bandwidth,so you'll need to pump up your prefs.