Making a menu based on switches

Started by Zexion, February 26, 2012, 06:41:42 pm

Previous topic - Next topic

Zexion

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.

Blizzard

if $game_switches[1]
  @mnlay.bitmap = RPG::Cache.picture(Layout::Background1)
elsif $game_switches[2]
  @mnlay.bitmap = RPG::Cache.picture(Layout::Background2)
end
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Zexion

thanks :P and lol your avatar makes me laugh