How do I search for keywords?

Get help using Construct 2

Post » Tue Sep 02, 2014 1:39 am

i would like to know if i can search for specific keywords in the text object . so if the user types something into a textbox, can i search for specific keywords?
B
15
S
3
G
1
Posts: 111
Reputation: 1,664

Post » Tue Sep 02, 2014 10:38 am

You can use regular expression for text matching purpose, as it's powerful and well supported in c2.

I've attached a capx to demonstrate the regex usage. Here's a few links that may help you to understand regular expression:

http://www.w3schools.com/jsref/jsref_obj_regexp.asp
https://developer.mozilla.org/en/docs/W ... cts/RegExp
http://regex101.com/
You do not have the required permissions to view the files attached to this post.
B
23
S
9
G
3
Posts: 114
Reputation: 3,794

Post » Fri Sep 05, 2014 2:02 am

@Herks thanks but that's not what i want

i want the game to search not the user. the user types something and the game searches for keywords in what the user has typed and do accordingly
B
15
S
3
G
1
Posts: 111
Reputation: 1,664


Return to How do I....?

Who is online

Users browsing this forum: marcinkowski, Shenkai the ssj and 24 guests