How do I detect wich word is clicked/touched in a text objec

Get help using Construct 2

Post » Mon Jul 28, 2014 5:33 pm

Can I do this?

...detect wich word is clicked/touched Inside a text object containing many words?

I didn't manage to find how to do this so far, read all the documentation about the text object and searched the Forum too...

Many thanks.
I made 2 games so far: www.ID-Games.net
B
11
S
2
Posts: 54
Reputation: 1,403

Post » Mon Jul 28, 2014 5:40 pm

I might be wrong, but I dont think it's possible..
There are many workarounds, but that depends on what you are trying to achieve..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 28, 2014 5:55 pm

Thanks for the reply!

Workarounds? I want to, as an example, make a "clickable url link" if a text box contains a url.

I tried to think about it...by using tokenat or find I can detect if a part of text is there...and I can detect a click on a whole text object but not on a part of it...and I don't want to separate my text objects into one for every word...
I made 2 games so far: www.ID-Games.net
B
11
S
2
Posts: 54
Reputation: 1,403

Post » Mon Jul 28, 2014 6:08 pm

Inside the game you need the browserobject to create hyperlinks..
The browserobject doesn't work within text as far as I know, but by adding detectionsprites at the right places to make the links clickable it could work..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests