Hey all,
I've been trying to have switches determine whether or not a menu option appears in the menu (not just if it is "selectable", but whether or not it is even called). I thought I came up with a simply solution to do so but, alas, no luck. I tried this:
def make_command_list add_main_commands add_formation_command add_original_commands if $game_switches[10] = true add_primal_command else end add_save_command add_game_end_command endMy thinking was "If 10 is on, add the command; if not, nothing. This, however, isn't working because it shows regardless. Any thoughts or solutions?
Appearance of a menu option dependant on a switch?
● ARCHIVED · READ-ONLY
-
-
for your "$game_switches[10] = true" part, it needs to be $game_switches[10] == true
notice the double = sign. That compares it. However, you could just put "if $game_switches[10]"
if you just simply put a variable, it checks if it's true or if it has a value (as in not nil). If it meets one of those things, then it executes the code. -
That worked just fine. Thank you!
*Solved: Feel free to close. :]* -
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.