redhot69
amongus
i was trying to code with ai and got this code trying to do an upward thingy thok
addHook("PlayerThink", function(p)
if p.mo.skin ~= "sonic"
if (p.pflags & PF_JUMPED)
and (p.cmd.buttons & BT_JUMP) then
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
end)
addHook("PlayerThink", function(p)
if p.mo.skin ~= "sonic"
if (p.pflags & PF_JUMPED)
and (p.cmd.buttons & BT_JUMP) then
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
end)