...and not (player.pflags & PF_STASIS)
and not (player.pflags & PF_FULLSTASIS)
and (P_IsObjectOnGround(player))
P_SetObjectMomZ(player.mo, 15*FRACUNIT)
end
end)
And it's giving the error bad arugment #1 to 'P_IsObjectOnGround' (MOBJ_T* expected, got userdata)
addHook("PlayerThink", function(player)
if player.mo and player.mo.skin == "sonic"
if (player.cmd.buttons & BT_CUSTOM2)
and not (player.pflags & PF_JUMPED or player.pflags & PF_SPINNING)
and (P_IsObjectOnGround)
P_SetObjectMomZ(player.mo, 15*FRACUNIT)
end
end
end)
I really need help on checking if the player has pressed the custom1 key, it's gonna launch the player upwards.
And when i make a script that everytime the custom1 key is pressed,
I can use the ability multiple times, idk how to make it to only work one time.
Ok then it's ok, so could u help me on making sparkles like super sonic that only works with the skin "h.r" and can kill enemies but not players with the skin "h.r" ?
addHook("PlayerThink", function(player)
if player.mo and player.mo.skin == "h.r"
if player.pflags == $2|PF_STARTJUMP|PF_STARTDASH
player.mo.state = S_PLAY_JUMP
P_SetObjectMomZ(player.mo, 15*FRACUNIT)
P_SpawnThokMobj(player)
end
end)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.