catopur
Member
I tried to give my character a spin boost like the one in sonic lost world but i can't get the code to work
addHook("PlayerThink", function(player)
if player.mo.skin == "Cato"
if player.cmd.buttons & BT_CUSTOM1
and P_IsObjectOnGround(player.mo) then
P_InstaThrust(player.mo, player.mo.angle, 50*FRACUNIT)
player.mo.state = S_PLAY_SPINDASH
player.pflags = $|PF_STARTDASH
player.powers[pw_sneakers] = 1*TICRATE
end
end
end)
am i doing something wrong?
worked it out its cause Cato was capitalized
addHook("PlayerThink", function(player)
if player.mo.skin == "Cato"
if player.cmd.buttons & BT_CUSTOM1
and P_IsObjectOnGround(player.mo) then
P_InstaThrust(player.mo, player.mo.angle, 50*FRACUNIT)
player.mo.state = S_PLAY_SPINDASH
player.pflags = $|PF_STARTDASH
player.powers[pw_sneakers] = 1*TICRATE
end
end
end)
am i doing something wrong?
Post automatically merged:
worked it out its cause Cato was capitalized
Last edited: