<aside> ⚡ script "map_bouncepad_vertical" (int force, int superforce, int sound)

</aside>

Event


This script is called by the player whenever they step on a vertical bounce pad. The parameters are determined by the bounce pad on which they stepped on.

Usage


This script can replaced by adding a new script in your map of the name, map_bouncepad_vertical, to add additional behavior to this event, or override the existing behavior.

This script has no expected return value.

Parameters

Default Script


The default vertical bounce pad script has relatively universal behavior.

First, to prevent the player from getting unintended extra bounce, check for a short-lived powerup called "JumpPadDelay". This powerup lasts 8 tics. If the player has this powerup, stop the script. Otherwise, give it to them.

Next, do some simple checks to figure out how much force to apply to the player.

If superforce is 0, populate it with the value of force.

Next, if the player is holding jump, apply superforce. Otherwise, apply force.

Finally, using sound, play the bounce sound using the script "map_bouncesound".