sm64coopdx/docs/lua/examples/instant-clip.lua
Agent-11 / Agent X 746dd50c5c
Add get/set_environment_region (#56)
Set the water height with a function. Also added an example for it in the documentation.
2022-04-05 15:53:16 -07:00

12 lines
No EOL
367 B
Lua

-- name: Instant Clip
-- description: Press L trigger, profit!
function mario_update(m)
if (m.controller.buttonDown & L_TRIG) ~= 0 then -- If L pressed
set_mario_action(m, ACT_WALKING, 0) --set mario to walking so his vel is used
m.forwardVel = 400 --set Velocity to clip speed
end
end
-- hooks --
hook_event(HOOK_MARIO_UPDATE, mario_update)