Issue with first point and click "adventure" game

Hi guys! I'm a relatively new user to the AI and I had a general question about something. Allow me to explain my situation: I've built a point and click style game, but I am now stumped on how to fix this "bug" that I have. So basically, the player enters a room (screen3) and has 3 options(buttons): go back(screen2), read writing on wall(screen4), or pick up a sword(Screen5). I made and drew the new screens because I don't yet know how or if you can do complex stuff on the same screen. Anyway, I am having an issue where if the player picks up the sword BEFORE reading the writing on the wall (which just says to pick up the sword with some flavor text) and then chooses to read the writing, it will go back to screen 3, which shows the weapon on the ground. I can't figure out what to write to get that to not happen, basically.

TLDR: I am having an issue with how easiest to code in player choice. Like basically, if you pick up the sword before reading the wall, and then read the wall, I want the sword to not be shown. If you click the button to read the wall before clicking the button to pick up the sword, I want the sword to still be shown on the ground because it hasn't yet been picked up yet.

I hope your head isn't hurting too much from reading that. I hope I've explained it well enough to where you kinda get what I'm asking for.

Welcome

This is some general advice:

Have you read Programming Your App to Make Decisions ? It explains how to use the 'If..then else' blocks.

You will have issues switching between Screens because you will have to pass information between screens frequently. Learn to use virtual screens from the start and you can avoid this quagmire (which requires a TinyDB to pass information to the 'other' Screen or using the 'open another screen' Blocks which awkwardly pass information).

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.

Learn about components http://ai2.appinventor.mit.edu/reference/components/

and visit the Library http://appinventor.mit.edu/explore/library Help>Library on the MENU

Thank you very much! I will look into reading that and finding out more about TinyDB!

Cheers!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.