Menus, Flags, and If-Thens

lorien
15 Sept 2007, 13:40
Hello! I purchased QDK Pro last night and am quickly trying to learn how the scripts work. It's a blast so far! My ten year old brother is attempting to convert the paper RPGs he has created into text adventures, and so I'm busily trying to keep ahead of the little fellow.

I'm currently experimenting with a television and a dvd player as interacting objects. My goal: when the dvd player is turned on, a "dvd collection" menu is called. The user selects a dvd from that menu and it plays on the television.

What I have so far:

- "turn on dvd player" checks if the tv is on. If yes, then the dvd collection menu is called.

- dvd is selected from the menu. That sets a flag, for example: "dvd doctor who on"

Question!
How do I get the television to discern between several different flags? A gazillion if-then queries? ie. if flag 1 on, then look=this, if flag 2 on, then look=that? I can't make that work thus far. I had the stray thought that I could have the menu call a case selection in order to minimize all of the flags... but I'm still lost on how I could change the look property depending upon which dvd flag/case is active.

Ideas? Thanks!
- Lorien

lorien
15 Sept 2007, 14:00
Wait! Nix that! I think I was making it too difficult.

I now have the menu changing the look property of the tv directly. Then if the tv or dvd player are turned off, they check each others' statuses and change their properties accordingly.

Is there an even simpler way of going about this, or perhaps any red flag warnings in here?

Otherwise, think I've got it!

witch wyzwurd
16 Sept 2007, 02:56
I'm not really sure if there's an easier way because your messages are pretty vague and a little confusing. Clarify the process you're using.