You've already forked sm64coopdx
mirror of
https://github.com/izzy2lost/sm64coopdx.git
synced 2026-03-26 16:56:02 -07:00
80deea3b62
* Update 4 example mods * localize functions in water-level.lua
18 lines
485 B
Lua
18 lines
485 B
Lua
-- name: Mario RUN!
|
|
-- description: Mario is constantly running.
|
|
|
|
local speedThreshold = 50
|
|
|
|
local function mario_update(m)
|
|
--Prevent mario from crouching or idling
|
|
if m.action == ACT_IDLE or m.action == ACT_CROUCHING then
|
|
set_mario_action(m, ACT_WALKING, 0)
|
|
end
|
|
|
|
-- Ensures that Mario moves at a speed greater than or equal to speedThreshold
|
|
m.forwardVel = math.max(m.forwardVel,speedThreshold)
|
|
end
|
|
|
|
-- hooks --
|
|
hook_event(HOOK_MARIO_UPDATE, mario_update)
|