How to set a player variable for a certain group of skins

Cosmic

somewhat decent(?) at lua scripting
So I would like to know how to set a variable for more than one skin, but not the whole cast of skins. How would I do this?
 
or keyword exists.
Example:
addHook("PlayerThink", function(player)
    if player.mo and player.mo.valid -- Filters invalid players
    and (player.mo.skin == "sonic" -- Sonic
    or player.mo.skin == "tails" -- Tails
    or player.mo.skin == "knuckles") then -- Knuckles
        print("You're playing as one of the three main characters.")
    end
end)
 
I figured out an alternative way of doing this. I didn't want to write or all the time so I figured, hey, why not use a sub-table system where I would have an index for each skin and if the skin didn't have certain stats written, then the stats would be written as defaults.
 

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

Back
Top