Rodriv64
Member
Hello! I'm trying to make a lua script that makes so if a player has a shield, even when standing, the shield would deflect most projectiles, a-la Sonic 3 & Knuckles. I tried making this code, but it doesn't work, idk what's wrong
Could someone help me?
Shield Deflect code:
addHook("PlayerThink", function(p)
if p.mo and p.mo.valid
if p.powers[pw_shield]
if mo and mo.valid and ((mo.flags & MF_SHOOTABLE) or (mo.flags & MF_MISSILE) or (mo.flags & MF_PAIN))
P_KillMobj(target,inf,src)
end
end
end
end)