sm64coopdx/mods/test.lua
MysterD 0aa1e04f93 More lua improvements
Added mods folder for lua scripts
Created constants.lua so scripts could use constants internal to the C code
Created event hooks
Separated out lua functions into multiple files
2022-01-16 18:07:45 -08:00

16 lines
353 B
Lua

function mario_update(index)
local m = get_mario_state(index)
if m.vel.y > 0 then
m.vel.y = m.vel.y + 2
end
set_mario_state(index, m)
if m.action == ACT_DIVE then
set_mario_action(index, ACT_TWIRLING, 0);
end
end
function update()
end
hook_event(HOOK_UPDATE, update)
hook_event(HOOK_MARIO_UPDATE, mario_update)