The
Platform behavior implements a side-view "jump and run" style movement. It supports slopes, moving platforms, "jump-thru" platforms, and arbitrary angles of gravity. There are several examples of the Platform behavior in the Examples folder in Construct 2's install directory.
The Platform behavior will land on any objects with the
Solid or
Jump-thru behaviors. Jump-thru is different in that the Platform movement can jump on to a Jump-thru from underneath, whereas jumping in to a solid from underneath causes the player to bounce off. The image below illustrates the difference.

By default the Platform movement is controlled by the left and right arrow keys and up arrow to jump. To set up custom or automatic controls, see the
behavior reference summary.
Implementing reliable platform movements
For the most reliable platform movement, it is recommended to use a
invisible rectangle sprite with no animations with the Platform movement. Then, the animated player object can be positioned on top of that. Otherwise, the changing size and collision polygon of the object as its animation plays can interfere with the Platform movement's floor, wall and slope detection, causing a shaking or glitchy movement.
Mirroring the player
It is not necessary to duplicate all your artwork for the player for facing both left and right. Instead, simply draw all the player's artwork for facing to the right, and use the Sprite object's
Set mirrored action to mirror the player's image. Set the player mirrored when pressing the movement controls. An example is shown below.

Platform properties
Max speedThe maximum floor speed in pixels per second.
AccelerationThe horizontal movement acceleration in pixels per second per second.
DecelerationThe horizontal movement deceleration in pixels per second per second. When moving in the opposite direction to the direction of motion, acceleration and deceleration combine.
Jump strengthThe initial vertical speed of a jump in pixels per second when the jump key is pressed.
GravityThe acceleration caused by gravity, in pixels per second per second.
Max fall speedThe maximum speed in pixels per second the object can accelerate to when in free-fall.
Default controlsIf
Yes, movement is controlled by the left and right arrow keys and the up arrow key to jump. Set to
No to set up custom controls using the
Simulate control action. For more information see
Custom controls in the
behavior reference summary.
Platform conditions
Compare speedCompare the current speed of the object in pixels per second.
Is by wallTest if a solid blocking horizontal movement is immediately to the object's left or right. Jump-thrus do not count as walls.
Is fallingTrue if the object is in free-fall.
Is jumpingTrue if the object is moving upwards.
Is movingTrue if the object's speed is non-zero.
Is on floorTrue if the object is currently standing on a solid or jump-thru.
On fallOn jumpOn landedOn movedOn stoppedThese are
animation triggers, which trigger when the platform movement is moving in to each state. If your object has animations for any of these states, you should set the appropriate animation in each trigger. This helps save you implementing the logic to detect state transitions yourself.
Platform actions
Set accelerationSet decelerationSet gravitySet jump strengthSet max fall speedSet max speedSet the corresponding properties. For more information, see
Platform properties.
Set angle of gravityChange the angle of gravity, in degrees. By default it is 90 (downwards on the screen). This can interact interestingly with layer rotation.
Set enabledEnable or disable the Platform movement. When disabled, the behavior has no effect on the object at all.
Set ignoring inputSet whether input is being ignored. If input is ignored, pressing any of the control keys has no effect. However, unlike disabling the behavior, the object can continue to move, e.g. if in free-fall.
Set vector XSet vector YManually set the horizontal and vertical components of motion, in pixels per second. For example, setting the vector Y to -1000 would cause a jump with strength 1000, which could be useful for implementing springs.
Simulate controlSimulate one of the movement controls being held down. Useful when setting
Default controls to
No. See
Custom controls in the
behavior reference summary for more information.
Platform expressions
AccelerationDecelerationGravityJumpStrengthMaxFallSpeedMaxSpeedReturn the corresponding properties. For more information, see
Platform properties.
MovingAngleReturn the current angle of motion in degrees, which can be different to the object's angle.
SpeedReturn the current overall speed in pixels per second.
VectorXVectorYReturn the current X and Y components of motion, in pixels per second.