Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Zexion on February 26, 2012, 06:41:42 pm

Title: Making a menu based on switches
Post by: Zexion on February 26, 2012, 06:41:42 pm
Okay I'm making a menu that will show different pictures based on whether the player has found a certain item. When the play finds the item it will turn on a switch, which the menu will check and display picture #1. How would i write something like
Quote
If switch 1 on
    @mnlay.bitmap = RPG::Cache.picture(Layout::Background1)

If switch 2 on
    @mnlay.bitmap = RPG::Cache.picture(Layout::Background2)

etc.
Title: Re: Making a menu based on switches
Post by: Blizzard on February 27, 2012, 02:20:24 am
if $game_switches[1]
  @mnlay.bitmap = RPG::Cache.picture(Layout::Background1)
elsif $game_switches[2]
  @mnlay.bitmap = RPG::Cache.picture(Layout::Background2)
end
Title: Re: Making a menu based on switches
Post by: Zexion on February 28, 2012, 08:10:34 am
thanks :P and lol your avatar makes me laugh