redhot69
amongus
addHook("PlayerThink", function(p)
if p.mo.skin == "sonic" -- Only apply to Sonic
if (p.cmd.buttons & BT_CUSTOM1) -- if c1 is pressed
and (p.mo.state == S_PLAY_JUMP) -- ensure Sonic is in jump state
then
p.mo.state = S_PLAY_SPRING
S_StartSound(p.mo, sfx_s3k75)
local boost = 5 * FRACUNIT
local upwardBoost = 6 * FRACUNIT
local angle = p.mo.angle
p.mo.momx = p.mo.momx + FixedMul(boost, cos(angle))
p.mo.momy = p.mo.momy + FixedMul(boost, sin(angle))
p.mo.momz = p.mo.momz + upwardBoost
end
end)
this code loaded normally and o got no errors in game but when i tried using the ability nothing happens no errors no nothing
if p.mo.skin == "sonic" -- Only apply to Sonic
if (p.cmd.buttons & BT_CUSTOM1) -- if c1 is pressed
and (p.mo.state == S_PLAY_JUMP) -- ensure Sonic is in jump state
then
p.mo.state = S_PLAY_SPRING
S_StartSound(p.mo, sfx_s3k75)
local boost = 5 * FRACUNIT
local upwardBoost = 6 * FRACUNIT
local angle = p.mo.angle
p.mo.momx = p.mo.momx + FixedMul(boost, cos(angle))
p.mo.momy = p.mo.momy + FixedMul(boost, sin(angle))
p.mo.momz = p.mo.momz + upwardBoost
end
end)
this code loaded normally and o got no errors in game but when i tried using the ability nothing happens no errors no nothing