calliecoolswag Member Nov 17, 2020 #1 Is it possible to make a character that instantly dies in water? I'm currently trying to do so and I've had no luck getting it to work.
Is it possible to make a character that instantly dies in water? I'm currently trying to do so and I've had no luck getting it to work.
Micro sonic heroes is a good game Nov 18, 2020 #2 Maybe you could ask OrdoMandalore, as they made a Bubsy mod in 2.1 that instantly died in water.
clairebun Community Noise Maker Sonic Team Junior Nov 18, 2020 #3 Check for player.mo.eflags&MFE_UNDERWATER and perform P_KillMobj(player.mo) Ideally this would be done in a PlayerThink hook.
Check for player.mo.eflags&MFE_UNDERWATER and perform P_KillMobj(player.mo) Ideally this would be done in a PlayerThink hook.
calliecoolswag Member Nov 18, 2020 #4 CobaltBW said: Check for player.mo.eflags&MFE_UNDERWATER and perform P_KillMobj(player.mo) Ideally this would be done in a PlayerThink hook. Click to expand... So would something like... addHook("PlayerThink", function(player) if MFE_UNDERWATER P_KillMobj(player.mo) end end end this work?
CobaltBW said: Check for player.mo.eflags&MFE_UNDERWATER and perform P_KillMobj(player.mo) Ideally this would be done in a PlayerThink hook. Click to expand... So would something like... addHook("PlayerThink", function(player) if MFE_UNDERWATER P_KillMobj(player.mo) end end end this work?
clairebun Community Noise Maker Sonic Team Junior Nov 18, 2020 #5 Code: addHook("PlayerThink", function(player) if player.mo and player.mo.eflags&MFE_UNDERWATER P_KillMobj(player.mo) end end) You'll check if player.mo exists first before you call player.mo.eflags (spectators don't have a player.mo).
Code: addHook("PlayerThink", function(player) if player.mo and player.mo.eflags&MFE_UNDERWATER P_KillMobj(player.mo) end end) You'll check if player.mo exists first before you call player.mo.eflags (spectators don't have a player.mo).