Platforms (I)

 (I) IMPORTANT: Understanding this section is vital to using Platformer PRO


Plaforms are used for level geometry that needs to do something more than or different to standard level geometry. Examples include: platforms that move back-and-forth, trampolines, and slippery ice.


Friction

The simplest thing you can do with a platform is change the friction. This can make the platform seem sticky or slippery to the player. The following table lists some friction values you might consider, however note that the affect of friction also depends on your ground movement settings):

 

Friction Setting Description
-1 Use characters default friction.
0 No friction.
1.5 Slippery Platform
2 Standard platform.
3 Sticky platform.

 Warning: Not all ground movements apply friction (e.g. Digital/Basic).


Activation/Deactivation

Platform is equipped with a boolean variable called Activated which is typically used to turn the effects of a platform on or off. A typical example would be an elevator which moves up and down when on, and does not move when off.

You can also configure the activation and deactivation of a platform to be automatic using the Automatic Activation and Automatic Deactivation fields. The following values are available.

Activation Types

NONE No automatic activation.
ACTIVATE_ON_START Activate when the level starts.
ACTIVATE_ON_STAND Activate when the character stands on the platform.
ACTIVATE_ON_LEAVE Activate when the character leaves the platform.

Deactivation Types

NONE No automatic deactivation.
DEACTIVATE_ON_STAND Deactivate when the character stands on the platform.
DEACTIVATE_ON_LEAVE Deactivate when the character leaves the platform.
DEACTIVATE_ON_EXTENT Deactivate when the platform reaches the end of its movement, for example when an elevator reaches its top or bottom position.

 

 

Parenting

When a character stands or in other ways collides with a platform you can choose to parent the character to the platform. You use parenting when you want the character to move with the platform, without relying on gravity and collisions. Most moving platforms should use parenting as it gives the smoothest movement.

To parent the character to a platform the platform must return 'true' to the Collide call described below (see Collisions).

Warning: Do not parent a character to a platform that is or can be rotated unless it has a uniform scale like (1,1,1). See FAQ for details on how to set up oddly shaped rotating, parenting platforms.


Built-in Platform Types

Platform Type Parenting? Description
BackAndForthPlatform true A platform that moves left and right.
DepthPlatform  false A platform which only hits characters at a certain depth (see Depth).
DepthSwitchPlatform  false A platform which changes the depth of the character as the walk through it (see Depth).
DestructiblePlatform  false A platform which takes damage and is destroyed after too much damage.
Door  false A special platform type for doors (see Doors).
FallingPlatform  false A platform that falls after it has been stood on for a certain amount of time.
LoopPlatform  false A platform used for creating a 360 degree loop.
Platform  false Default platform, you can use this for friction control (e.g. ice).
SpringBoardPlatform  false A platform that bounces the character in to the air when the y jump on it.
SpawnOnHeadbutt   false A platform that spawns items when head butted. Similar to the mario [?] boxes which spawn coins.
SpecialMovementPlatform  false  Triggers a special movementGenerally used for acrobatic mecanim movements.
StompOnHead  false  A special type of platform which is attached to Enemies (see enemies) and allows you to damage or kill them when you jump on their head.
TriggerPlatform  false A platform that behaves like a Trigger (see Triggers).
UpAndDownPlatform  true A platform that moves up and down.

Note: This list is not comprehensive as the available platform types are always growing.


See also:

Writing Custom Platform Types which explains the Platform API in detail.

AdditionalConditions for adding extra activation conditions to your platform.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk