Hey guys so i was wondering if there is a way to
unlock menu points via an in-game switch (for example)
Like in the menu at first you have
-???
-Item
-Equipment
(and so on)
and then once the switch is on
it will be this for example
-Journal
-Item
-Equipment
(and so on)
for changing menu name
def main
#names
name = ???? if $game_switches[ID] = false #change to the id number of the switch you use
name = status if $game_switches[ID] = true
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "#{name}" #<--- name used here
s5 = "Save"
s6 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
and if your using default menu (some menus it may be different.)
when 3 #status | when id <-- id depends on where in the menu you placed the new scene
if game $game_switches[ID] = false
$game_system.se_play($data_system.buzzer_se)
else
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
didnt test it but should work, there's probably better ways of doing this though.
@^ your code syntax is wrong
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = journal_switch ? 'Journal' : '????' #<--- name used here
s5 = "Save"
s6 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
...
def journal_switch
$game_switches[ID] # replace ID with integer
end
when 3 #status | when id <-- id depends on where in the menu you placed the new scene
if journal_switch == false # in conditional branch, you shouldn't use single equal sign
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
.....
lol sorry about that and thank you for correction :)
Aw yeah :D thanks alot. Is there also a quick way to grey it out as long as its disabled ?
def main
# Make command window
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = journal_switch ? 'Journal' : '????' #<--- name used here
s5 = "Save"
s6 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
@command_window.disable_item(3) unless journal_switch
...
Thanks :D