how do I get the second picked instance of object

Get help using Construct 2

Post » Tue Jul 02, 2013 8:28 am

in my code I have several events like this
+ for (something)
+ letterTile | touched
+ letterTile | another condition

I understand that I can get how many of letterTile instances picked at the another condition event using letterTile.pickedCount, but how do I get the second instance of the picked letterTile object?

I tried for looping using letterTile.pickedCount as the end index but that doesn't work like I want it to.
B
45
S
13
G
2
Posts: 173
Reputation: 5,326

Post » Tue Jul 02, 2013 8:55 am

Hey @Daggio
The best solution is the System condition "Pick Nth instance". You tell it what object you are looking for, wich one you want (0-based) and here you go !
Example capx
B
17
S
8
G
4
Posts: 461
Reputation: 6,097

Post » Tue Jul 02, 2013 9:57 am

wow, that solved it Guizmus! thanks! XD
now I know what pick nth instance is for :D
B
45
S
13
G
2
Posts: 173
Reputation: 5,326


Return to How do I....?

Who is online

Users browsing this forum: ColombageEnPLS and 8 guests