I made a mod that brings the A Button Challenge to the game by killing the player whenever they push their jump button and I'd like to share it here
-- name: A Button Challenge
-- description: This is a pretty simple mod, you press jump/the 'A' button and you die. Disabled during dialog. Affects all players individually. Can you beat the game with as few jumps as possible?
-- Runs every frame for each player
function update(m)
-- Safety check
if m == nil then return end
-- Don't trigger if player is dead already
if m.health <= 0 then return end
-- Check if player is in dialog (talking, reading text, etc.)
if (m.action == ACT_READING_NPC_DIALOG or
m.action == ACT_WAITING_FOR_DIALOG or
m.action == ACT_READING_AUTOMATIC_DIALOG) then
return
end
-- Detect jump button press (A button)
if (m.controller.buttonPressed & A_BUTTON) ~= 0 then
-- Kill ONLY this player
m.health = 0
end
end
hook_event(HOOK_MARIO_UPDATE, update)
-- name: A Button Challenge
-- description: This is a pretty simple mod, you press jump/the 'A' button and you die. Disabled during dialog. Affects all players individually. Can you beat the game with as few jumps as possible?
-- Runs every frame for each player
function update(m)
-- Safety check
if m == nil then return end
-- Don't trigger if player is dead already
if m.health <= 0 then return end
-- Check if player is in dialog (talking, reading text, etc.)
if (m.action == ACT_READING_NPC_DIALOG or
m.action == ACT_WAITING_FOR_DIALOG or
m.action == ACT_READING_AUTOMATIC_DIALOG) then
return
end
-- Detect jump button press (A button)
if (m.controller.buttonPressed & A_BUTTON) ~= 0 then
-- Kill ONLY this player
m.health = 0
end
end
hook_event(HOOK_MARIO_UPDATE, update)