Making a character not drown

Status
Not open for further replies.

Klinx the Weasel

a.k.a Luna
I have a character wad that is literally a floating head in a bubble (people that read the Archie comics might know who I'm talking about) and it makes no sense for him to drown. So I've been trying to write a Lua script that stops it, but I'm not having much luck.

This is the code I wrote trying to do it. It doesn't give me any errors, but it doesn't do what I want it to do either.
Code:
addHook("ThinkFrame", function()
    for player in players.iterate do
        if player.mo.skin ~= "dimitri"
            continue
        else
            A_CustomPower(player.mo, 5, 1073741824)
            A_CustomPower(player.mo, 6, 1073741824)
        end
    end
end)

I'm sure I'm going about this completely the wrong way but I'm running out of ideas on things to try.
 
Code:
addHook("ThinkFrame", do
    for player in players.iterate
        if player.mo and player.mo.skin == "dimitri"
        player.powers[pw_underwater] = 1073741824
        end
    end
end)

fixed.
 
Thank you so much!
I was able to use the same thing for the space timer and now everything works perfectly.
(Made sure to put a comment thanking you in the script too. ^^)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top