redhot69
amongus
so im making a mod and trying to make when i fall on the ground i bounce a little bit upwards after using the ability,heres the starting code if anyone is wondering
addHook ("Playerthink", function(player)
if player.mo.skin == "sonic"
if player.cmd.buttons & BT_CUSTOM1
and P_IsObjectOnGround(player.mo)
and (player.mo.state) == S_PLAY_RUN or S_PLAY_WALK or S_PLAY_STND then
P_InstaThrust(player.mo, player.mo.angle, 5*FRACUNIT)
P_SetObjectMomZ(player.mo, 15*FRACUNIT)
player.mo.state = S_PLAY_ROLL
player.pflags = $|PF_SPINNING
end
end
end
end
end)
addHook ("Playerthink", function(player)
if player.mo.skin == "sonic"
if player.cmd.buttons & BT_CUSTOM1
and P_IsObjectOnGround(player.mo)
and (player.mo.state) == S_PLAY_RUN or S_PLAY_WALK or S_PLAY_STND then
P_InstaThrust(player.mo, player.mo.angle, 5*FRACUNIT)
P_SetObjectMomZ(player.mo, 15*FRACUNIT)
player.mo.state = S_PLAY_ROLL
player.pflags = $|PF_SPINNING
end
end
end
end
end)
Last edited: