Is there a way to make the super transformation rings requirement higher or lower?

I made a simple Hook to help you!
(LUA warning!)

Lua:
addHook("PlayerThink", function(player)
    if player.mo and player.mo.valid and player    .mo.health
    local all = 1|2|4|8|16|32|64
        if (player.rings <= 99 and not player.powers[pw_super])or emeralds != all
            if player.charflags & SF_SUPER
                player.charflags = $ - SF_SUPER
                end
            end
        if player.rings >= 100 and emeralds == all
            if not (player.charflags & SF_SUPER)
                player.charflags = $|SF_SUPER
                end
            end
        end
    end)
srb20514.gif
 
Last edited:
Thanks! ima see if this works
I made a simple Hook to help you!
(LUA warning!)

addHook("PlayerThink", function(player)

Lua:
addHook("PlayerThink", function(player)
    if player.mo and player.mo.valid and player    .mo.health
    local all = 1|2|4|8|16|32|64
        if (player.rings <= 99 and not player.powers[pw_super])or emeralds != all
            if player.charflags & SF_SUPER
                player.charflags = $ - SF_SUPER
                end
            end
        if player.rings >= 100 and emeralds == all
            if not (player.charflags & SF_SUPER)
                player.charflags = $|SF_SUPER
                end
            end
        end
    end)
View attachment 139326
Post automatically merged:

also, does this work with custom characters?
 
Sure!
Also you can make the Hook restricted to a specific character by doing this!


Lua:
addHook("PlayerThink", function(player)
    if player.mo and player.mo.valid and player    .mo.health
    local all = 1|2|4|8|16|32|64
        if player.mo.skin != "sonic" return end

//You can change "sonic" for the name of the character that you want the code to apply to!

        if (player.rings <= 99 and not player.powers[pw_super])or emeralds != all
            if player.charflags & SF_SUPER
                player.charflags = $ - SF_SUPER
                end
            end
        if player.rings >= 100 and emeralds == all
            if not (player.charflags & SF_SUPER)
                player.charflags = $|SF_SUPER
                end
            end
        end
    end)
 

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

Back
Top