Physical Movements - Platform Movement
The Physics - Platform movement makes your character move and jump like a platform game character. You can set the speed and height of the jumps, the speed of the character. You can also make your character crouch and climb on ladders. Warning : the hot-spot of the images of the object should be located "within the feet" of the character, that is, in the bottom of the image, in the center. Platforms and obstacles must be detected by a "Colliding with background" condition.
- Initial direction
Choose the direction at which the object will be created. If you select more than one direction, the final direction is chosen at random when the object is created.
This property contains the maximum speed of the object. The object will never go over that speed, whatever the value of the acceleration property.
This property contains the acceleration factor of the object. A higher value means that the object will go from static to full speed in the minimum amount of time.
This property contains the deceleration factor of the object. Once you release the keys (or the gamepad), the object will slow down. The higher the value of this property, the faster the object will come back to a zero speed.
- Use acceleration when changing directions
This property has an influence on how the character changes directions (going from right to left for example). If checked, the character will slow down first (based on the deceleration property), turn around, and then accelerate in the oppposite direction (based on the acceleration property). If unchecked, it will turn instantly, keeping its momentum.
- Climbing speed
This property contains the speed of the character when he climbs (up or down) a ladder.
- Allow crouch
Check this property, and the object will crouch when you press the down arrow. The "Crouch" animation will be displayed in the object. When crouched, the object will move at the crouch speed, defined by the next property.
- Speed when crouched
This property contains the maximum speed of the object when it is crouched. This speed is usually lower than the full, standing-up speed.
- Initial direction
This property contains the strenth of the first jump. You should set this property in accordance with the gravity scale property (and also the gravity of the world). The higher the gravity, the lower the jump (but the faster the fall down). You have to set this property to a higher value to compensate for a higher gravity.
- Multiple jumps
This property contains the number of jumps in a row allowed for the object. If set to one, the object will only be able to jump once. If set to two, you will be able to jump twice, the second jump being performed while in the air. Etc.
- Next strength
This property contains the strength of the further jumps, that is the jumps done when you are already jumping.
- Jump while crouched
Check this property to allow your character to jump when he is crouched.
This property defines how a jump is triggered. It can be the first button, the second button, or a combination of movement direction and the up direction. If you set this property to none your character will never jump.
- Horizontal control while jumping
Check this property and you will be able to change the direction of the object, and accelerate during a jump.
This property contains the density of the object, a number from 0 to 100. A dense object will be heavier, and therefore more difficult to move when colliding with other objects. The mass of the object is calculated by the engine from the surface of the object and from the density.
This property contains the elasticity factor of the object. Use a value of 0, and the object will stop as soon as it collides with another object. Use a value of 100, and the object will bounce, keeping the momentum of its movements. Intermediate values change the bouncing factor, and how the momentum is transfered while bouncing.
- Gravity scale
This property contains a percentage indicating how much of the physical world gravity must be applied to this object. A value 100 will apply the gravity as defined in the Physic Engine object. A value of 0 makes the object float in the air. A value of 200 will put a gravity twice as strong on the object, and thus make it fall faster.
- Mask width
The collision mask of an object with a platform movement is similar to a box having the width of the object. This property enables you to reduce the width of this collision mask, making the behavior of the object more realistic on steep slopes. It contains a percentage of the image width. A value of 50, for example, will create a mask of half the width of the first image of the object.
- Engine ID
This property is designed to be used if you drop more than one Physics - Engine object in your frame. Enter the Engine ID value of the engine you want to use for this movement.
- Mask width
Stops the object. If the stop action is called within a collision with another object, the other object will be pushed. If the action is called out of a collision context, the speed of the object is set to zero (but the gravity continues its action, and the object will start falling again).
- Set speed
Changes the speed of the character. He will start to move in the direction it is facing.
- Set acceleration
Changes the acceleration factor of the object. The value has the same meaning as the "Acceleration" property.
- Set deceleration
Changes the deceleration factor of the object. The value has the same meaning as the "Deceleration" property.
- Set gravity
This action allows you to set the local gravity factor of the object. It asks for a percentage of the world's gravity. A value of 0 and your object will float into the air, a value of 200 and your object will fall twice as fast on the floor.
Spread the word!
You can share this document using the following buttons.