Xkower8181
Member
Hello this me and this time I have a Lua problem
So here's a code
And here a screenshot of an error
So here's a code
Code:
addHook("MobjMoveCollide", function (npc, thing)
if npc.target.type == MT_PLAYER
and thing.valid and thing.health
and abs(npc.z - thing.z) < thing.height then
local player = npc.target.player
if thing.flags & MF_MONITOR then
P_KillMobj(thing, npc, player.mo)
elseif thing.flags & (MF_ENEMY|MF_BOSS) then
P_DamageMobj(thing, npc, player.mo, 1)
end
end
end
end
end
end, MT_NPC)