Yes/No answer collection!

mbenhalim

  • Posts: 3
I'm really new to Stencyl and trying to create a game for an art project. Basically the game is that player goes into a factory. Their they answer 231 questions with yes or no (by pressing on them) and depending on the amount of yes, the player gets 1 of 5 chairs. I'm currently in the process and made most of it, but I'm really stuck with how to collect the amount of yes the player presses and correlate that amount to a certain chair!

Can anyone help me?

Thank you :)

stefan

  • *
  • Posts: 2263
Hey and welcome!
Can you show us how you stored the questions with answers in your game?

mbenhalim

  • Posts: 3
I attached images of all that i have going on in events. Basically i'm just letting it count the score and the chair appears depending on the number in the score. But i think there is maybe some other way to do it?!!

t4u

  • Posts: 418
and depending on the amount of yes, the player gets 1 of 5 chairs.
[/quote]

I don't udnerstna . How do you see it. I press yes => what should happen and based on what?

I get that if I press yer or no the question should increase by one. But what's the deal with chairs?

Screenshot 3 is bad. It should be done as (When pressed on self) in actor behavior
USE PICTURES WHEN YOU ASK SOMETHING!
If I helped you be sure to mention it in your game.

Tutorials + downloads:
http://t4upl.blogspot.com/

jsblack

  • Posts: 117
This all looks OK.

I don't really see what the issue is, other than in the last picture you are showing a way to tie the score into giving a chair, but you've not shown us how exactly you are assigning that score. It would make sense that the score is assigned whenever a "YES" is pressed and "YES" was the correct answer. You just need a few IF Statements.

gplar

  • Posts: 1115
And it would simplify your code if you stick the questions in a list (Make a .txt file wit one question per line and import to list from .txt file) and pull one by one from the list. Easier to maintain and you´ll lose the 250 If-blocks.  ;)