How do I pick only 1 text box

Get help using Construct 2

Post » Thu Mar 06, 2014 4:23 pm

I highlight your score if you made the top 10 list. However, sometimes, there are multiple of the same score. How do I prevent the highlight from highlighting all the same score and just highlight 1?
B
58
S
19
G
3
Posts: 446
Reputation: 6,302

Post » Thu Mar 06, 2014 4:43 pm

Hi, there are many ways of doing this. You could pick the nth instance. If you have many objects in an layout I would suggest instance variables for that. I do it like that all the time. e.g.:

1. Select your Textbox Object -> Create instance variable (value number). I always call my instance variable for that "Call_ID".

2. Go to your Layout and select each instance of the object type and give it a diffrent "Call_ID" => e.g. for the first row highcore text object "1".

3. If you now just wanna highlight that box you could use the following event: pick by comparison, then enter the two values ( the value "1" and the instances "Call_ID"). All following actions on this object type will just cause effect on this instance.

Remember you don't have to do it with instance variable. Every object has allready an UID or ID. I prefere doing this with instance variables because you can (if needed) give two object elements the same "Call_ID".

Hope this helps you. You can find a lot about this in the manual as well.

Cheers Marco.
B
34
S
9
G
3
Posts: 206
Reputation: 7,851

Post » Thu Mar 06, 2014 4:47 pm

Thank for your help!
B
58
S
19
G
3
Posts: 446
Reputation: 6,302


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests