TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Yes/No answer collection!
Pages:
1
Yes/No answer collection!
mbenhalim
Posts: 3
November 23, 2015, 07:26:57 pm
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
November 24, 2015, 04:33:23 am
Hey and welcome!
Can you show us how you stored the questions with answers in your game?
mbenhalim
Posts: 3
November 24, 2015, 09:56:35 am
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
November 24, 2015, 12:34:57 pm
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
November 25, 2015, 11:49:59 am
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
November 26, 2015, 11:13:34 am
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.
Pages:
1