SonicjrFan
Member
I fixed a bit of the code.
We might need to tell the owner
We might need to tell the owner
if not (player.cmd.buttons & BT_USE) then
local function allSpin(p)
if p.spectator then return end
if not (player.cmd.buttons & BT_CUSTOM1) then
(p.speed > 5*FRACUNIT and p.pflags & PF_STARTROLL) true end
if P_IsObjectOnGround(p.mo) and p.mo.state != S_PLAY_ROLL and (p.pflags & (PF_USEDOWN|PF_ROLL)) then
and p.mo.skin == "gens" before "then"
p.cmomx = 5 * cos(p.mo.angle)
p.cmomy = 5 * sin(p.mo.angle)
p.mo.cmomx = p.cmomx
p.mo.cmomy = p.cmomy
p.mo.state = S_PLAY_ROLL
p.pflags = $ | (PF_USEDOWN|PF_ROLL)
S_StartSound(p.mo, sfx_DSSPIN)
return true
end
if P_IsObjectOnGround(p.mo) and p.pflags & PF_ROLL and p.mo.state == S_PLAY_ROLL and
not (p.pflags & (PF_USEDOWN|PF_STARTDASH)) then
p.mo.state = S_PLAY_ROLL
and p.mo.skin == "gens" before "then" p.pflags = ($ & ~PF_ROLL) | PF_USEDOWN
return true
end
end
addHook("SpinSpecial", allSpin)
I think I can handle a custom 1 roll button, cuz am doing it now already.I think its still bugged but i will
if not (player.cmd.buttons & BT_USE) then local function allSpin(p) if p.spectator then return end if not (player.cmd.buttons & BT_CUSTOM1) then (p.speed > 5*FRACUNIT and p.pflags & PF_STARTROLL) true end if P_IsObjectOnGround(p.mo) and p.mo.state != S_PLAY_ROLL and (p.pflags & (PF_USEDOWN|PF_ROLL)) then and p.mo.skin == "gens" before "then" p.cmomx = 5 * cos(p.mo.angle) p.cmomy = 5 * sin(p.mo.angle) p.mo.cmomx = p.cmomx p.mo.cmomy = p.cmomy p.mo.state = S_PLAY_ROLL p.pflags = $ | (PF_USEDOWN|PF_ROLL) S_StartSound(p.mo, sfx_DSSPIN) return true end if P_IsObjectOnGround(p.mo) and p.pflags & PF_ROLL and p.mo.state == S_PLAY_ROLL and not (p.pflags & (PF_USEDOWN|PF_STARTDASH)) then p.mo.state = S_PLAY_ROLL and p.mo.skin == "gens" before "then" p.pflags = ($ & ~PF_ROLL) | PF_USEDOWN return true end end addHook("SpinSpecial", allSpin)
ThanksI think I can handle a custom 1 roll button, cuz am doing it now already.
addHook("PlayerThink", function(player)
if P_IsObjectOnGround(player.mo)
and player.mo.skin == "gens"
and (player.cmd.buttons & BT_CUSTOM1)
and player.speed > 2*FRACUNIT
and not (player.pflags & PF_SPINNING)
player.pflags = $ | PF_SPINNING
player.mo.state = S_PLAY_ROLL
S_StartSound(player.mo, sfx_spin)
end
end)
COM_AddCommand("homingattack", function(player, arg1)
if player.mo.skin == "gens"
if not player.mo then return end
player.charability = CA_HOMINGTHOK
CONS_Printf(player, "You now have the Homing Attack!")
end
end)
COM_AddCommand("homingattackoff", function(player, arg1)
if player.mo.skin == "gens"
if not player.mo then return end
player.charability = CA_NONE
CONS_Printf(player, "You do not have the Homing Attack anymore!")
end
end)
Okwill be there support with the mod like Xmomentum?
Um i think the homingattack is glichedHere's the download + script
Lua:addHook("PlayerThink", function(player) if P_IsObjectOnGround(player.mo) and player.mo.skin == "sonic" and (player.cmd.buttons & BT_CUSTOM1) and player.speed > 2*FRACUNIT and not (player.pflags & PF_SPINNING) player.pflags = $ | PF_SPINNING player.mo.state = S_PLAY_ROLL S_StartSound(player.mo, sfx_spin) end end) COM_AddCommand("homingattack", function(player, arg1) if player.skin == "sonic" if not player.mo then return end player.charability = CA_HOMINGTHOK CONS_Printf(player, "You now have the Homing Attack!") end end) COM_AddCommand("homingattackoff", function(player, arg1) if player.skin == "sonic" if not player.mo then return end player.charability = CA_NONE CONS_Printf(player, "You do not have the Homing Attack anymore!") end end)
Oh, I did fixed it after all. so you can copy the code or download the wad now,
Thanksyooooo that's cool