[NPC and Library] Sonic Power Sneakers & speedboost.lua
Posted: Thu Mar 11, 2021 8:38 am
This is my first public upload, which I made last night. It includes two components: a library named speedboost.lua and the Power Sneakers from the Sonic franchise. I'm probably more proud of this than I should be. First, the shoes:
When picked up, the Power Sneakers will significantly boost your speed for 14 seconds. Specifically, your walking speed becomes double your running speed and your running speed will be quadrupled! Here's the powerup in action:

Note that this footage was recorded with donthurtme (god mode) activated, and it will NOT protect you from enemy attacks! Be careful while using it.
speedboost.lua is a library included to interface with the speedboost function. It can be used to either force a speed boost or check whether or not you are currently boosting. It can be enabled by adding the following code to the top of your luna.lua:
It is not required to add to your luna.lua file for the Power Sneakers to work, but if you delete it they WILL stop working.
The function speedboost.GottaGoFast() can be used to force a speedboost, and the variable speedboost.Boosting will be either 1 (if boosting) or 0 (if not). This can be used to check whether you are presently experiencing a speedboost, as demonstrated above.
Here's an example script which depends on afterimages.lua to create afterimages while boosting for the intended feeling:
This script "borrows" the audio muting code from the starman script, as well as two lines of collision detection from 9thCore's Metal Cap because I'm too lazy to write my own code. It also uses the sprite from Sonic Lost World with an outline added and the sneaker theme from Sonic Adventure 2.
GOTTA DOWNLOAD FAST! (no regrets)
When picked up, the Power Sneakers will significantly boost your speed for 14 seconds. Specifically, your walking speed becomes double your running speed and your running speed will be quadrupled! Here's the powerup in action:

Note that this footage was recorded with donthurtme (god mode) activated, and it will NOT protect you from enemy attacks! Be careful while using it.
speedboost.lua is a library included to interface with the speedboost function. It can be used to either force a speed boost or check whether or not you are currently boosting. It can be enabled by adding the following code to the top of your luna.lua:
Code: Select all
speedboost = require("speedboost")
The function speedboost.GottaGoFast() can be used to force a speedboost, and the variable speedboost.Boosting will be either 1 (if boosting) or 0 (if not). This can be used to check whether you are presently experiencing a speedboost, as demonstrated above.
Here's an example script which depends on afterimages.lua to create afterimages while boosting for the intended feeling:
Spoiler: show
GOTTA DOWNLOAD FAST! (no regrets)