sm64coopdx/docs/lua/examples/Moonjump.lua
Mechstreme 80deea3b62
Update 4 example mods (#205)
* Update 4 example mods

* localize functions in water-level.lua
2024-07-13 14:46:41 -04:00

11 lines
No EOL
288 B
Lua

-- name: MoonJump
-- description: Hold the A button to Moonjump
local function mario_update(m)
if (m.controller.buttonDown & A_BUTTON) ~= 0 then --If the A button is held
m.vel.y = 25 --Set Y velocity to 25
end
end
-- hooks --
hook_event(HOOK_MARIO_UPDATE, mario_update)