I DONT KNOW CREATING A MOD V1.0

Ibrazds

Member
Sep 26, 2024
24
1
130
@KeegoBlock @SuperRodrigo0 @ToadGamer64 @AgentX
Pronouns
I am very much looking for the job
LUA:
-- name: I DONT KNOW CREATING A MOD V1.0
-- incompatible: gamemode
-- description: Yes, is a mod created by a dumb bruh. Created by Ibrazds

function mario_update(m)
    if m.action == ACT_IDLE or m.action == ACT_CROUCHING then
        set_mario_action(m, ACT_WALKING, 0)
    end
end

-- hook event
hook_event(HOOK_MARIO_UPDATE, mario_update)

    function bhv_custom_goomba_loop(obj)
        if obj.oGoombaJumpCooldown >= 9 then
            obj.oGoombaJumpCooldown = 8
            obj.oVelY = obj.oVelY + 20
            obj.oForwardVel = 20
        end
    end

-- hook the behavior
id_bhvCustomGoomba = hook_behavior(id_bhvGoomba, OBJ_LIST_PUSHABLE, false, nil, bhv_custom_goomba_loop)   

function mario_before_phys_step(m)
    local hScale = 1.0
    local vScale = 1.0

    -- faster swimming
    if (m.action & ACT_FLAG_SWIMMING) ~= 0 then
        hScale = hScale * 2.0
        if m.action ~= ACT_WATER_PLUNGE then
            vScale = vScale * 2.0
        end
    end

    m.vel.x = m.vel.x * hScale
    m.vel.y = m.vel.y * vScale
    m.vel.z = m.vel.z * hScale
end

-- hook event
hook_event(HOOK_BEFORE_PHYS_STEP, mario_before_phys_step)
 

Users who are viewing this thread