Essentials Series/Platforms: Difference between revisions

m
no edit summary
Battlepedia>Igorseabra4
(Created page with "{{EssentialsSeriesBox}} This page is part of the Essential Series modding tutorials. A '''Platform''' (PLAT) is an entity asset that creates a model...")
 
mNo edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1:
{{EssentialsSeriesBox}}
This page is part of the Essential Series modding tutorials. A '''Platform''' ([[PLAT]]) is an [[Asset#Entity Asset|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 [[ANIM|Animations]] is a platform. Platforms can move on their own or be moved by [[../Links/|events]]. PLATsPlatforms are usually found in the Default layer of the level's HIP.
 
== Using Platforms ==
[[Industrial Park (level editor)|Industrial Park]] has a Generic Platform [[../Asset Templates/|template]]. After placing the template, you '''must''' assign it a model yourself, otherwise the game will crash.
 
You can check [[Asset#Entity Assets|Entity Assets]] and [[../Editing Assets/#Gizmos|Gizmos]] for general information about placement of Entity assets. [[SIMPs../Simple Objects/#Animations|Animations]] and [[SIMPs../Simple Objects/#Drivenby|Drivenby]] of SIMPsSimple Objects apply the same way for PLATsplatforms.
 
== Movement Preview ==
This is a function available in Industrial Park, under OptionsDisplay. When on, platforms, [[../Buttons/|buttons]] and other assets will move similarly to how they should in the game. This method is '''experimental''' and the movement 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 [[SIMPs../Simple Objects/#Events|events which work for SIMPsSimple Objects]] function the same way on PLATsplatforms. Other events are also used on PLATsplatforms:
 
* '''Run''': send this to a platform to make it start moving.
Line 16 ⟶ 19:
* '''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 [[../SIMPs/#Drivenby|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.
Line 25 ⟶ 28:
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 ===
Set the '''PlatformType''' to '''Platform''' and the '''PlatformSubtype''' to '''ExtendRetract''' to use this platform type.
 
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 ===
Set the '''PlatformType''' to '''Platform''' and the '''PlatformSubtype''' to '''Orbit''' to use this platform type.
 
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 ===
Set the '''PlatformType''' to '''Platform''' and the '''PlatformSubtype''' to '''Spline''' to use this platform type.
 
''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.
Set the '''PlatformType''' to '''Platform''' and the '''PlatformSubtype''' to '''MovePoint''' to use this platform type.
 
This is a platform that moves according to a move point ([[MVPT]]) chain, much like enemies also can.
 
Place Point_MVPT templates to use this platform type.
Place Point_MVPT templates to use this platform type. The platform will start at the MVPT whose asset ID is in the Motion section, and when moving 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. You can set the last point's Next to the first one to put the platform in a continuous loop. The platform will not function properly if it reaches a MVPT with no Next, but you can set the Next of the last one to itelf if you want it to stop there. The speed is also configurable.
* 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 ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''Mechanism''' to use this platform type.
 
This is the most common platform type in the game. A Mechanism can perform translation and rotation movements.
 
Line 78 ⟶ 77:
* '''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 PLATplatform assets and even copy them to your level if one has a similar movement to the one you're looking for.
 
=== Pendulum ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''Pendulum''' to use this platform type.
 
''TODO: add explanation''
 
=== ConveyorBelt ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''ConveyorBelt''' to use this platform type.
 
This is a platform that moves you to the side when you are on top of it.
 
Line 99 ⟶ 94:
 
=== BreakawayPlatform ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''BreakawayPlatform''' to use this platform type.
 
This is a platform that breaks after you land on it.
 
Line 106 ⟶ 99:
 
=== Springboard ===
This is a platform that bounces you after you land on it. See [[../Springboard Tutorial/]] for a detailed explanation.
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''Springboard''' to use this platform type.
 
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 ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''TeeterTotter''' to use this platform type.
 
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.
 
Line 124 ⟶ 113:
 
=== Paddle ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''Paddle''' to use this platform type.
 
This platform is used in BFBB as the mechanism that spins when you throw a Bubble Bowl at it, activating other things.
 
Line 137 ⟶ 124:
 
=== FullyManipulable ===
Set both the '''PlatformType''' and '''PlatformSubtype''' to '''FullyManipulable''' to use this platform type.
 
This platform does not move by itself, only through events. These events can do anything to this platform type. The Motion section is ignored.
 
Line 170 ⟶ 155:
 
== Other Information ==
=== 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:
# Create a [[GRUPGroup]] asset (you can place the Group template).
# Add all platforms that need to be synced to this group.
# Add the link ScenePrepare => GroupUpdateTogether to the group's links, with the group itself as the target.
When you are in the range for one of the platforms, all of them will be updated together instead of separately.
 
[[Category:Modding]] [[Category:Tutorials]]
== Movement Preview ==
This is a function available in Industrial Park, under Options. This method is '''experimental''' and the movement preview is '''not accurate to the game''', specially on more complex movement types.
 
[[Category:Modding]] [[Category:Tutorials]]