Essentials Series/Platforms

This page is part of the Essential Series modding tutorials. A Platform (PLAT) is an entity asset that creates a model in the world, with all the possibilities of a SIMP, but with the added functionalities. Usually, this is a programmable movement, but can be other things as well (such as springboards and conveyor belts). There are many different platform types and they can perform all sorts of functions. Platforms are, in the game, not only platforms in a literal sense. Anything that perfoms programmable patterns of movement that are not Animations is a platform. Platforms can move on their own or be moved by events. PLATs are usually found in the Default layer of the level's HIP.

Using Platforms
Industrial Park has a Generic Platform template. After placing the template, you must assign it a model yourself, otherwise the game will crash.

You can check Entity Assets and Gizmos for general information about placement of Entity assets. Animations and Drivenby of SIMPs apply the same way for PLATs.

Movement Preview
This is a function available in Industrial Park, under Display. When on, platforms, buttons and other assets will move similarly to how they should in the game. This method is experimental and the preview is not accurate to the game, specially on more complex movement types (such as Slide+Rotate on Mechanism). Always test your platform movements ingame.

Events
All events which work for SIMPs function the same way on PLATs. Other events are also used on PLATs:


 * Run: send this to a platform to make it start moving.
 * Stop: send this to a platform to make it stop moving.
 * Arrive: this is sent by the platform to itself when it finishes its movement.
 * ArriveHalfway: this is sent by the platform to itself when it's halfway through its movement.
 * Mount: this is sent by the platform to itself when the player lands on top of it.
 * Dismount: this is sent by the platform to itself when the player jumps off of it.
 * Mount (another use): if a PKUP asset sends this to a platform, it will follow its movement. This is the pickup's equivalent of Drivenby.
 * Reset: send this to a platform and it will instantly return to its initial position.
 * SetSpeed: send this to a platform to override the speed with the value in the first argument. This only works for some platform types.

Additional events are also used on specific platform types.

Platform Settings
The PlatFlags attribute has two known settings: Shake on Mount (1) and Solid (4). If set to 0, the platform will be unsolid. Set it to 5 to enable both.

The PlatSpecific and the Motion sections of a platform are dependant on their type. You can change a platform's type by setting the PlatformType field.

In a platform's Motion section, you can set Flags which control the platform's behavior. For the Motion flags, there are two known settings: Face Movement Direction (1) and Don't Start Moving (4). Set it to 0 and the platorm will start moving automatically, no events needed. Set it to 1 and the platform will rotate itself to face the direction of movement. Set it to 4 and the platform will be stopped, requiring you to send events to control it. Set it to 5 to enable both.

ExtendRetract
This platform moves continuously between two points in space. The amount of time it takes to perform each movement and the amount of time it waits on the ends before returning is configurable in the Motion section.

Orbit
This platform rotates around a central point, forming an ellipse shape. The width and height of the ellipse is configurable, as well as the time it takes to perform the movement, in the Motion section.

Spline
TODO: add explanation

MovePoint
This is a platform that moves according to a move point (MVPT) chain, much like enemies also can. The speed is also configurable.

Place Point_MVPT templates to use this platform type.
 * The platform will start at the MVPT whose asset ID is in the Motion section.
 * When moving, it will continue to the NextMVPT of the MVPT asset.
 * Once the next has been reached, it will continue to the next's next, and so on. The chain can be as long as you like.
 * If you want the platform in a continuous loop, set the last point's NextMVPT back to the first one.
 * If you want the platform to stop at the final MVPT, set its Next to itself. Do not leave any MVPT in the chain without a Next as the platform will not function properly.
 * If a MVPT has multiple NextMVPTs, the platform will randomly choose one of them!

The platform will send the Arrive event to each move point when it arrives on it. You can use this to detect when a platform has reached a specific move point.

Mechanism
This is the most common platform type in the game. A Mechanism can perform translation and rotation movements.


 * MovementType: this sets if the platform can slide (translate), rotate, or do both (at the same time, or one after the other).
 * MovementLoopMode: this is a flag bitfield. It controls what the platform will do once it starts moving.
 * If set to 0, the platform will continuously perform the movement without returning.
 * If set to 1, the platform will continuously move and return (performing the Forward and Reverse movements).
 * If set to 2, the platform will perform only the Forward movement once and stop (you need to send an event to make it perform again).
 * If set to 3, it's a mixture of both: it will move and return (Forward and Backward), but only once and stop, requiring you to send an event to make it move again.
 * Note that it can start moving (the first time) either by itself or through an event. This is set in the Motion Flags field, common to all platform types, explained above.
 * SlideAxis and RotateAxis: these control the direction in which the platform will move.
 * SlideDistance and RotateDistance: these control the distance the platform will move. Rotation is in degrees.
 * SlideTime and RotateTime: how long the platform takes to perform the movement, in seconds.
 * SlideAccelTime, SlideDecelTime, 'RotateAccelTime and RotateDecelTime: these control smoothness in the platform's movement, when beggining and finishing the movement.
 * RetractDelay: if the platform is set to loop, this is how long it will wait before beginning the next movement.
 * PostRetractDelay: if the platform is set to loop and move and return, this is how long it will wait after performing the whole movement before doing it again.

A mechanism's Slide movement is relative to local rotation. This means that, if a platform is rotated 90 degrees on its side, the Y axis is actually sideways and not up! This also applies to rotation inside the mechanism's motion. If a platform is set to SlideThenRotate, slide 5 units on the Y axis and rotate 90 degrees on the X axis, after moving upwards once and rotating, the next movement will actually be 5 units to the side, then after rotating again it will move downwards etc. as the movement is transformed locally.

Events:
 * Forward: send this to make it move forward.
 * Reverse: send this to make it move in the opposite direction. This can be done while the platform is still moving forward. It will immediately reverse its movement.

If the information above confuses you, you can take a look at the game's original PLAT assets and even copy them to your level if one has a similar movement to the one you're looking for.

Pendulum
TODO: add explanation

ConveyorBelt
This is a platform that moves you to the side when you are on top of it.

In the PlatSpecific section, you can choose the conveyor belt's speed. Note that the platform's model will not have any animation. The Motion section is ignored as this platform doesn't move (but it can be Drivenby a platform that does!).

FallingPlatform
This platform type is unknown/unused.

FR
This platform type is unknown/unused.

BreakawayPlatform
This is a platform that breaks after you land on it.

In the PlatSpecific section, you can choose the time it will take to break, the model it should change to when breaking (which can be left blank) and the time it will take to reset after breaking. The Motion section is ignored as this platform doesn't move (but it can be Drivenby a platform that does!).

Springboard
This is a platform that bounces you after you land on it. See ../Springboard Tutorial/ for a detailed explanation.

The Motion section is ignored as this platform doesn't move (but it can be Drivenby a platform that does!).

TeeterTotter
This is a platform that tilts to the side when you land on it. Depending on how far to the edge of the platform you are, it will tilt faster. Unfortunately, it can only tilt in one direction. You can choose the initial tilt and the maximum tilt in degrees, as well as the mass (which controls how fast it tilts) in the PlatSpecific section.

The Motion section is ignored as this platform doesn't move (but it can be Drivenby a platform that does!).

Events:
 * Tilt
 * Untilt

Paddle
This platform is used in BFBB as the mechanism that spins when you throw a Bubble Bowl at it, activating other things.

TODO: add better explanation

The Motion section is ignored as this platform doesn't move (but it can be Drivenby a platform that does!).

Events:
 * PaddleHitLeft
 * PaddleHitRight

FullyManipulable
This platform does not move by itself, only through events. These events can do anything to this platform type. The Motion section is ignored.

TODO: add better explanation

Events:
 * TranslateLocalX
 * TranslateLocalY
 * TranslateLocalZ
 * TranslateWorldX
 * TranslateWorldY
 * TranslateWorldZ
 * RotateLocalX
 * RotateLocalY
 * RotateLocalZ
 * RotateWorldX
 * RotateWorldY
 * RotateWorldZ
 * TranslateLocalXDone
 * TranslateLocalYDone
 * TranslateLocalZDone
 * TranslateWorldXDone
 * TranslateWorldYDone
 * TranslateWorldZDone
 * RotateLocalXDone
 * RotateLocalYDone
 * RotateLocalZDone
 * RotateWorldXDone
 * RotateWorldYDone
 * RotateWorldZDone

SetUpdateDistance
By default, platforms oly update (move) when the player is in a specific distance from them. Send the SetUpdateDistance event to the platform (this is usually done on ScenePrepare => SetUpdateDistance in the platform's own links) to set a new update distance to the platform, which should be in the first argument. This is commonly left as 0, which will make the update distance infinite! (the platform will always move, no matter how far you are from it). This has been known to fix issues of platforms not moving.

GroupUpdateTogether
Since platforms only update when the player is in a specific distance, two or more platforms might get off sync due to being in different positions. If you don't need a platform to always update, but you need its movement to be synced with other platforms: When you are in the range for one of the platforms, all of them will be updated together instead of separately.
 * 1) Create a GRUP asset (you can place the Group template).
 * 2) Add all platforms that need to be synced to this group.
 * 3) Add the link ScenePrepare => GroupUpdateTogether to the group's links, with the group itself as the target.