Hello-
First may I say that I really appreciate the guidance I've gotten so far in making my first game- this has been a very helpful resource. You have all been great about checking my code, holding my hand through my confusion, etc.
Now I have two bigger questions (or at least they seem that way to me the layman.) I'm designing a puzzle that requires me to learn two new programming mechanics.
1. The puzzle involves a keypad with a 3x3 button grid. Pushing one button causes other buttons to light up and some buttons to go off if already lit. The goal is to find the sequence of buttons that will cause all the buttons to become lit. To accomplish this I made a "lit" version of the buttons that serves as an object within the game. All 9 "lit button" objects start out as invisible and are made visible when clicked on. So the code, in essence, says "When button five is pushed, cause objects 2, 4, 6, and 8 to become visible."
So my question is this: how do I write code which causes the game to become aware when all of the buttons are lit so as to trigger the result of the puzzle?
2. The reward for the puzzle is to open a door that is on a different screen. The open door is an object that becomes visible. How do I trigger a result on a different room from the one I'm on?
Thank you so much for you help!
First may I say that I really appreciate the guidance I've gotten so far in making my first game- this has been a very helpful resource. You have all been great about checking my code, holding my hand through my confusion, etc.
Now I have two bigger questions (or at least they seem that way to me the layman.) I'm designing a puzzle that requires me to learn two new programming mechanics.
1. The puzzle involves a keypad with a 3x3 button grid. Pushing one button causes other buttons to light up and some buttons to go off if already lit. The goal is to find the sequence of buttons that will cause all the buttons to become lit. To accomplish this I made a "lit" version of the buttons that serves as an object within the game. All 9 "lit button" objects start out as invisible and are made visible when clicked on. So the code, in essence, says "When button five is pushed, cause objects 2, 4, 6, and 8 to become visible."
So my question is this: how do I write code which causes the game to become aware when all of the buttons are lit so as to trigger the result of the puzzle?
2. The reward for the puzzle is to open a door that is on a different screen. The open door is an object that becomes visible. How do I trigger a result on a different room from the one I'm on?
Thank you so much for you help!