map-pin Powered-Up Super Ultra Advanced Moving Platform Guide Elite Reloaded Plus™

  • Weather
  • Weather's Avatar Topic Author
  • Offline
  • Professional Marbler
  • Professional Marbler
  • Posts: 483
  • Thank you received: 262
03 Mar 2017 00:32 #1
PUSUAMPGERP™
The old one is lame. :P this one might be too I dunno I did my best :c
I made an example level that will be posted after the IContinueToTTime patch.

The moving platform system cannot rotate and scale interiors. For that, you'll need to use MBP's path node system.
This will assume you know how to use the level editor (and Constructor for that part of the tutorial).
The Constructor section will build onto the Essentials section, so it's best to read that first.
If you're new to making moving platforms, I recommend making a copy of your level and interior files in case it breaks!

Essentials
This section covers making MPs without a custom interior.
Keep in mind that when editing MPs with the level editor you'll need to save and reload the level to see the changes.
Required code
First, you'll need to modify your level (.mis) file with a text editor to add the code that creates a moving platform.
Copy the code below into the bottom of your level file just before the last };. You'll need to do this for each MP.
Code:
new SimGroup(MustChange_One) { new Path() { new Marker() { position = "0 20 0"; rotation = "1 0 0 0"; scale = "1 1 1"; seqNum = "0"; msToNext = "3000"; smoothingType = "Accelerate"; }; new Marker() { position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; seqNum = "1"; msToNext = "3000"; smoothingType = "Accelerate"; }; new Marker() { position = "0 20 0"; rotation = "1 0 0 0"; scale = "1 1 1"; seqNum = "2"; msToNext = "1000"; smoothingType = "Linear"; }; }; new PathedInterior(MustChange) { position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "PathedDefault"; interiorResource = "platinum/data/interiors_mbg/beginner/training_platform.dif"; interiorIndex = "0"; basePosition = "0 0 0"; baseRotation = "1 0 0 0"; baseScale = "1 1 1"; initialTargetPosition = "-1"; }; };
Before breaking it down, there are a few things to mention:
I suggest looking closely at how the curly brackets structure the code and objects — it might help you avoid syntax errors. If there are any, the level won't load, in which case you may want to look for red text in the console that will try to show you were the errors are.
Wherever you see a line like new Something(Name) {, that's the beginning of an object or group of objects. You can put text in the parentheses to give it a name, as long as the name only contains letters, underscores or numbers. It must also start with a letter, or your level won't load! The name can also be set in the level editor by typing into the white box to the right of the apply button then clicking apply.
The parameters of these objects and groups can be changed either in code or in the level editor, but when changing parameters via code, don't remove the quotes!

  1. The first line creates a SimGroup, simply a group of objects. It contains everything for a single MP.
  2. The next line new Path() { tells the game to make a special group of markers that tell the moving platform where to go and how. All of the code for the markers goes after this line but before its corresponding };.
  3. The next bunch of code is a marker object:
    Code:
    new Marker() { position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; seqNum = "0"; msToNext = "1000"; smoothingType = "Accelerate"; };
    If you want to add another marker, copy that into the level file with the other markers.
    These are a marker's parameters:
    • The position line contains the XYZ coordinates of the marker, but you'll probably want to change this in-game. If you can't find the marker in the level editor, find it in the list of objects in the top right and click on it in the list, then use the F3 screen to set the position to that of a nearby object.
    • The rotation and scale lines don't modify how the platform moves, so you can ignore them.
    • seqNum is the number of the marker, or where in the path the marker is. The first marker should have seqNum set to 0, the next marker to 1, and so on.
    • msToNext is the amount of time (in milliseconds of course) it takes the moving platform to get from the marker to the next one.
    • smoothingType should be one of three types: Linear, Accelerate or Spline. Linear will cause the MP to move to the next marker at a constant speed, Accelerate will smoothly speed up away from the marker and slow to a halt as it reaches the next, and Spline appears to be Linear but it will curve the path of the MP based on the positions of the previous and next markers so it changes its heading smoothly. It's best to use Spline markers together.
  4. Now for the moving platform itself:
    Code:
    new PathedInterior(MustChange) { position = "0 0 0"; rotation = "1 0 0 0"; scale = "1 1 1"; dataBlock = "PathedDefault"; interiorResource = "platinum/data/interiors_mbg/beginner/training_platform.dif"; interiorIndex = "0"; basePosition = "0 0 0"; baseRotation = "1 0 0 0"; baseScale = "1 1 1"; initialTargetPosition = "-1"; };
    The parameters:
    • position, rotation and scale are reset upon loading the level, but you can use them to figure out how the base equivalents should be.
    • dataBlock points the game to code used in MPs and shouldn't be changed.
    • interiorResource is the path to the interior (.dif) file containing the MP's model.
    • interiorIndex tells the game which MP model in the interior to use. In interiors, each MP model is assigned a number (starting with 0), and the number of an MP model must be entered here to use it. If there is only one MP model in the interior you wish to use, keep it at 0, otherwise you may need to fiddle with this to find the right one. MP models are usually numbered by how far into the level they are.
    • basePosition, baseRotation and baseScale are what MPs use for pos/rot/scale instead of the typical parameters. basePosition cannot be set in the level editor because whenever you save, it is reset to 0 0 0.
    • initialTargetPosition can be set to -1, 0 or 1. It determines what the MP does when you restart, and triggers override this. -1 will cause the MP to go through the path repeatedly, warping back to the first marker when it reaches the last. 0 won't make the MP do anything, and 1 places the MP at the end of the path making it go backwards through it to the start, but is kinda buggy and won't do this every time. If you're having trouble with a triggered MP, try setting initialTargetPosition to 1.
Adding triggers
The trigger that MPs use, TriggerGotoTarget, tell them to go to a specific spot in the path, based on time.
To add one, copy this code into the SimGroup for your MP:
Code:
new Trigger(MP_Trigger) { position = "0 0 0"; rotation = "1 0 0 0"; scale = "4 4 4"; dataBlock = "TriggerGotoTarget"; polyhedron = "0 0 0 1 0 0 0 -1 0 0 0 1"; targetTime = "0"; instant = "0"; IContinueToTTime = "0"; };
  • Ignore rotation, dataBlock and polyhedron.
  • targetTime is how far along the path in milliseconds to tell the MP to go. If this is set higher than the total time of a run through the path, the MP will go to the end, and if it's 0, the MP will go to the start of the path.
  • If instant is 1, the MP will warp to targetTime instantly.
  • This is currently broken in MBP — I have succeeded in pestering Higoo to fix it in the next patch: The MP will go to the time specified in IContinueToTTime after warping if instant is 1 and IContinueToTTime isn't 0.
Things to know
  1. Don't forget that you'll need a marker at the end of your path, at the final location the MP will move to. If your MP goes through the path on a loop, it will warp back to the first marker the instant it comes to the last, so if you want it to actually move to the start like any other part of the path, the final marker must be in the same spot as the first.
  2. If you want the MP to pause at some point then continue, use two markers in the same spot, one after the other.
  3. The pivot point of an MP model is rarely where the center of the visible mesh is. You can see its true pivot in the level editor by unchecking Objects Use Box Center in Edit > World Editor Settings...
  4. When using checkpoints before triggered MPs, don't forget to have a second trigger surrounding the checkpoint that sends the MP back to where it's meant to be when the marble activates it. Otherwise, the player can get stuck and have to restart the level.
  5. The position of the first marker relative to the MP at its basePosition is used as a basis for where the MP should go relative to future markers.

Using Constructor
As far as I know, Constructor can't load MPs and undo actions in a file with MPs. A few people have told me it can load them, but it doesn't work for me. Anyway, this is the method I use. I have my MPs in a separate interior from the main one when there are more than a few MPs.
You'll need these two plugins:
(Pretty sure path_node doesn't come with Constructor) www.perishingflames.com/Assorted/MBItems_Constructor.zip
higuy.me/platformassist.php
  1. Once you have your interior and MP models, decide on splitting them into groups based on the length of the paths you'll make.
  2. For each group:
    2-1. Select the brushes of the moving platforms in the group and a couple other brushes nearby to help position nodes and triggers.
    2-2. Copy and paste them to a new file and don't move them. You can switch between open files with the drop-down list at the top right.
    2-3. Go back to the main interior and delete the MP brushes that were copied.
    2-4. In the new file, make a box brush for each trigger. You can also make some small brushes to show where markers should go. (example)
    2-5. Save the new interior as a CSX file.
    2-6. For each moving platform:
    1. Select all of its brushes and under Brush Type in the Object panel to the left choose Other then Door_Elevator and hit okay. This is really the last step you need to do for an MP in Constructor, as the triggers and markers can be made by editing the level file like any other MP.
    2. For each brush you made for a trigger, select only it and change its brush type to Trigger.
    3. In the top left, click the Add Entity button, click somewhere in the scene, then in the list to the left, find path_node and select it then hit enter. Position the entity where the first marker goes, then hold Shift and move it to duplicate it, move that into place for the next marker, and so on. If you need to select a previous entity to move it, use the list to the right.
    2-7. Save as a MAP file without saving the CSX first. If you want to edit the MP model, open the CSX. You'll need to re-make the triggers and path if you haven't yet imported it all into the level editor, but from my experience Constructor can't load them correctly, sooo...
  3. Close that ancient software, convert yer interiors, then pop 'em into the level editor, making sure they're all at the same position (0 0 0 if you can).
  4. Select an interior with MPs, click Create Subs, then delete it if the non-MP brushes are just for reference. Do this only once for each interior with MPs.
  5. Save and reload the level, then tweak.
The following user(s) said Thank You: Ralph, Frostfire, NF, Nockess, Jaymez, Yoshicraft224, CylinderKnot

Please Log in or Create an account to join the conversation.

Moderators: Doomblah
Time to create page: 0.782 seconds
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.