Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How do I make it so that the player can view a map item(picture) and close out of it?

I have several items in the inventory which show a picture. I have a map (self explanatory), and several "Cards". The cards are just for collecting purposes (if you wanna be a completionist), and you're able to view them for some artwork. How can I make it so that when you select the item on the menu, it brings up the picture, and when you're done looking at it, press X to cancel and go back to the menu? I tried by having a common event show the picture,and wait for the button input X, which works until you press X again, which brings up the card again:-/

Any ideas?
 
I guess for the common event you would put.

LOOP
Show picture 1
conditional branch
x button is being pressed

break loop
end branch
END LOOP

(outside of loop here)
erase picture 1
erase event


I'm pretty sure this will work for you, I'm not on my rmxp computer at the moment to check if it does, but it should... If not I'm sure someone else will find my fault. :s:thumb:
 
Have you tried this?

Code:
@>[COLOR=Red]Change Items: [Map] + 1[/COLOR]
@>[COLOR=DarkOrchid]Show Picture: 1, 'Map', Upper Left (0,0), (100%, 100%), 255, Normal[/COLOR]
[COLOR=Blue]@>Conditional Branch: The C button is being pressed[/COLOR]
     @>[COLOR=DarkOrchid]Erase Picture: 1[/COLOR]
     @>
[COLOR=Blue]Branch End[/COLOR]
@>

Haven't tested it yet, but it may work.
 
I had the same problem but I used Ccoa's "Universal Message System" to make an invisible text box.

The \opc[0] sets the text box to 0 opacity (invisible) so only the pause button is showing.
If you also want to remove the pause button you could use,
$game_system.show_pause = false

So when the user hits the X button the invisible text box goes away and the event continues on to Erase Picture.

http://i2.photobucket.com/albums/y28/Gotcha16/Untitledpicture-1.png[/IMG]

I don't know how else to do it, haven't messed around with it. D:

Oh, and the '$game_system.opacity = 255' sets the text box back to its normal opacity.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top