how to answer a question
LordTarantor
Member, PRO Posts: 890
Hello everybody:
I created a numerical pad to submit a numerical answer. The number will be displayed in an box (actor).
The question is: how to put an enter and how to tell the game if it is the correct answer or the incorrect.
I created a numerical pad to submit a numerical answer. The number will be displayed in an box (actor).
The question is: how to put an enter and how to tell the game if it is the correct answer or the incorrect.
Comments
He may be able to help. I was trying something similar, but it didn't pan out because GS doesn't support Arrays yet.
http://gamesalad.com/forums/topic.php?id=7522#post-49887
Does that help at all?
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
You sir, are a genius. Your method will work, but it will require lots of text typing!
I just got home from work. I been all day trying to set up a big light beacon on top of the highest building a big light beacon with a T-shirt in the center and you tell me NOW that the proper way to call him is one loud scream to the air Teeeeeeeeeeee-Shiiiiiiiirt!!!!
Thank god there is another superhero in town.
Thanks Mr. Sheep I will look into it and let you know if justice prevail.
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Ok I read the instructions and they look super simple but I don't have the brain to process this yet.
Where do I put the variables for this letters. Should I create an attribute for each letter and if that is correct, what kind of attribute.
Then should I create an actor for each letter and assign the correct attribute to them. If this is correct, How?
Then the same questions for the squares.
Then how to change the value of the squares
Wow another then...
Then how to put an enter like to enter the answer.
In my case this part should be simple because instead of letter they are numbers so it is only from 1 to 10 (0). then i ask a question and the answer is only 2 numbers (2 squares). After that an enter, if the question is correct this happens but if it is incorrect this other thing happens.
The light beacon is out and you can see a sheep in the sky!!!
My brain is fried...
Please forgive me then for not going into greater detail right now. I'll try tomorrow if someone else hasn't helped!
Sorry!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
"some times he does not show up when the beacon is on"
Have a good night
I will turn on the beacon tomorrow.
Thanks
Following the link posted above I created two scenarios. One where you drag the number into the square and change the square value and another where you press the number (instead of dragging) and change the square value. From this two scenarios I will like to go with the pressing one but I am having problems with both.
With the pressing scenario: when I press one number the value of the first square change and a display text change the number. Now how can I change the second square without affecting the first, how do I tell the numbers which square to change.
With the dragging scenario: when I drag the number it change the value of the square as long as I leave the number touching that square. If I want to use the same number for another square I cant because is already in use. What I would like it to do is that once it touches the square, it changes the square value and go back to its original position.
Again from the two scenarios I will like to use the pressing one but at this time I am easy, I will go with any of them.
Think about what you're doing. You have to have specific numbers in specific locations. You have to 'block' the already used boxes...
Let's say Box 1, box 2, box 3 and box 4. This is where your four numbers will go (more if you need them, obviously!)
Have a global integer variable called 'sequence'. Initial value = 0 (i.e. all boxes are empty).
If box 1 is full, then change attribute 'sequence' to 1
If box 2 is full, then change attribute sequence to 2
etc etc
Now, when you press a button, say '1', in that button is a rule that says
When you press this button, let sequence = sequence +1.
IF sequence =1, then put this number in box 1
If sequence = 2, then put this number in box 2
etc etc
So, you could press the number '1' four times, and it should go into the right boxes because every time you're pressing the button, the sequence goes up.
Does that make any sense at all???
QS :O
Edit - you can also use this to determine when the sequence has been completed.
Say you have four boxes. If you press 1, 1, 2, 3, then each time you press those buttons, the sequence goes up by one, and puts them in the right place.
If you know your numbers will be only four digits long, the largest sequence number you could have would be four.
So, if sequence is greater than 4, then you've entered all the numbers.
Sorry if this makes no sense... tired...
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I can be like Gordon in Batman and you can be like Robin or something. Well enough with the Super nonsense.
I am glad to announce the the question has been answered!!!
It was so simple that at the end of the road were I thought there was no road ahead, almost at the point were I was going to say "you know what, my game doesn't really need this part" kabooon... the answer... a simple otherwise.
A rule in my number actor that says when presses, another Rule inside this one that says: attribute: the damn square1 = to 0
change attribute: damn square1 to game.#1 (remember that i created an attribute for each #)
OTHERWISE #^/<%!
Change Attribute: damn square2 to game.#1
That was it.
Thanks QS for all the ideas you gave they help me to get to the finish line. Thanks