View Single Post
Old 12-28-2019   #1
Katmint
 
Katmint's Avatar
Default Lua cannot access MFE_TOUCHLAVA

I've provided a sample script that's intended to kill the player when touching lava to ensure the fault is not on my end.
Code:
addHook("MobjThinker", function(lava)
    if (lava.player)
    and (lava.player.mo.eflags & MFE_TOUCHLAVA)
        P_KillMobj(lava, lava, lava)
    end
end, MT_PLAYER)
If you change MFE_TOUCHLAVA to MFE_TOUCHWATER in the above script, it will kill the player on water contact. Currently it will error on map load since MFE_TOUCHLAVA is nil.

Last edited by Monster Iestyn; 12-30-2019 at 11:39 AM.
Katmint is offline