As mentioned in this thread, there are various different behaviors we might see from jumping in games we play that aren’t easily doable in ROBLOX. For instance: double jumping, disabling jumping entirely for non-platformers, having a cooldown for jumps, etc. I recognized that this was an inconvenience for ROBLOX developers, especially for those of us who aren’t programmers, and released the following model:
It enables developers to do the following:
- Double/triple/etc jumps
- Set jump height directly instead of through a mysterious JumpPower (which is really VelocityInitial)
- Cooldown between jumps
- Disable jumping entirely
All of these are possible to set by default with no programming knowledge whatsoever, but programmers can tweak these settings for individual characters mid-game through the provided API. Use cases include but are not limited to:
- Giving extra jump height for an ability
- Defaulting to no jumping, but enabling jump in specific areas (such as Brick Bronze’s obby gym)
- Add a cooldown to jumping when the player is wearing really heavy armor
This model takes advantage of a few tricks that can encourage Humanoids to exhibit these behaviors without resorting to custom implementations, meaning this is compatible with all platforms out of the box, and compatible with features that are closely knit with jumping such as animations, sound, and swimming. Due to its minimal changes to humanoids, this model is also compatible with existing scripts that listen for when a humanoid jumps.
Most of these features are difficult to show, so here’s a file that can be used to experiment with them:
JumpTweakerDemo.rbxl (32.5 KB)
I am still looking to expand this to suit even more needs. If this model is missing functionality you need for your game, please post here and I will look into incorporating it into the model.