More options in "compare text"

Get help using Construct 2

Post » Thu Sep 27, 2012 8:49 pm

I'm using "compare text" with "textbox" and everything is perfect, when the player enters confirms that he is right or not.

My problem is that I need to add more options to the "comapre text".

For example the right answer is ball, however the player may end up putting "Ball" or "BALL".
I need my "compare text" accepted more than one option as "ball", "Ball", "BALL".

I believe that with a simple code phrase I can solve this, I've searched but have not had success.

I appreciate the patience with a beginner.
B
3
Posts: 4
Reputation: 583

Post » Thu Sep 27, 2012 9:19 pm

You will need to use a System: Compare Two Values condition to compare the values. Then use the System.uppercase function, like so:



Text.Text is the text value from your text object.Wastrel2012-09-27 21:20:54
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Thu Sep 27, 2012 9:29 pm

Thank you, I will try now.
But is there any way to do it that way. (pic related)


Uploaded with ImageShack.us
B
3
Posts: 4
Reputation: 583

Post » Thu Sep 27, 2012 9:41 pm

Oh yeah, I forgot about the text compare in the object.

Then just do this:



Using Ignore Case will get you the same results as my previous post.
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Thu Sep 27, 2012 9:49 pm

Thank you, helped me a lot.
B
3
Posts: 4
Reputation: 583


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 11 guests