Finding text in an array?

Get help using Construct 2

Post » Thu Mar 14, 2013 9:01 pm

I want the user to input a text in the text box and if that text matches any text in an array something would happen. How can I compare the entire array to a text?
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Thu Mar 14, 2013 9:34 pm

https://www.scirra.com/manual/108/array

Contains value
Searches the entire array to check if any of the elements contains the given value. For example, you can use this to test if the string "sword" is stored anywhere in the array.

https://www.scirra.com/manual/117/textbox

Text
Get a string containing the text currently entered in to the field.                        
Mistakes were made.
B
37
S
17
G
67
Posts: 1,041
Reputation: 38,211


Return to How do I....?

Who is online

Users browsing this forum: h1k3 and 17 guests