Jump Pad
Overview
In an effort to learn Lua in class, I made a Jump Pad for the GuildEd Engine used in school. The pad allows any developer to put a custom image and sound in, and change the amount of velocity the pad accelerates the player.
Scripting Highlights
Making the Player Jump
It's a simple script, so the main functionality is found within the function beginContact( o ).
The Letter "o" refers to the player. (this was inherent to GuildEd).
I wanted to give options to the developer when implementing my code. Thus, the Jump Pad can either:
1. Only trigger the "bounce" if the player jumps on top of the Jump pad.
2. Trigger the bounce on top of the pad, or if the player simply walks into it.
The Letter "o" refers to the player. (this was inherent to GuildEd).
I wanted to give options to the developer when implementing my code. Thus, the Jump Pad can either:
1. Only trigger the "bounce" if the player jumps on top of the Jump pad.
2. Trigger the bounce on top of the pad, or if the player simply walks into it.
Velocity Magic and sound functionality
This is where the magic occurs to make the velocity change. It's essentially just applying a jump with adjustable measurements. (Note: a comment with "--JS:" is my instructor's few lines of code)
Download the Full Lua File |