I want to switch a character's gear with an alias based on the current state of the gear setup. The best/easiest way I can think of doing this (with my non-coder skills), is have a permanent variable that gets checked to see what the current gear state is, and then checked to see what it should change to. But: I'm trying to figure out how to do it without having a permanent variable set up in the character's profile, mainly because adding extra permanent variables to every character starts getting tedious since they each have their own profile.
So far, I have:
Code: Select all
if switch == "normal" then sendAll("all the commands to switch gear")
my_weapon = "new weapon state"
switch = "new gear state"
elseif switch == "new gear state" then sendAll("all the commands to switch gear back to normal state")
my_weapon = "normal weapon"
switch = "normal"
end