I'm trying to make some custom movesets, and I decided to do the ground pound from mario odyssey, the thing is that I want that to happen only one at a time and when mario is in his idle state, then you can do it again
The code:
canUseGroundPound = true
function mario_update(m)
Movesets = {
[1] = m.controller.buttonDown & A_BUTTON ~= 0
}
if m.action == ACT_GROUND_POUND_LAND and Movesets[1] and canUseGroundPound then
set_mario_action(m, ACT_TRIPLE_JUMP, 0)
canUseGroundPound = false
end
if m.action == ACT_IDLE then
canUseGroundPound = true
end
end
hook_event(HOOK_MARIO_UPDATE, mario_update)
The code:
canUseGroundPound = true
function mario_update(m)
Movesets = {
[1] = m.controller.buttonDown & A_BUTTON ~= 0
}
if m.action == ACT_GROUND_POUND_LAND and Movesets[1] and canUseGroundPound then
set_mario_action(m, ACT_TRIPLE_JUMP, 0)
canUseGroundPound = false
end
if m.action == ACT_IDLE then
canUseGroundPound = true
end
end
hook_event(HOOK_MARIO_UPDATE, mario_update)