Alternate to UID to controlling cloned sprites?

Get help using Construct 2

Post » Mon Nov 21, 2011 10:56 pm

I've been researching all afternoon on your forum, and maybe it's flying over my head.

Essentially why I am trying to do is take a sprite that's been cloned five times in my software. Then attempt to manipulate each one individually, without the headache of having to obtain each UID beforehand.

Usually I have to obtain the UIDs. Then use those within a line of Sprite, Pick instance with UID of, etc.




Now, I made an instance variable of "testvar", and gave each sprite its own value of 1,2,3,4,5 and 6.

As for my question
Within "Pick instance with UID of..."...how do code within that line to obtain control of each sprite graphic with an instance variable?

Thank you for your time :)
-Dan
B
4
G
1
Posts: 6
Reputation: 513

Post » Mon Nov 21, 2011 11:20 pm

Just use the "Compare instance variable" condition to pick a certain instance.

The event will look like this:
Sprite: testvar=1
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Mon Nov 21, 2011 11:27 pm

Thank you so much!
B
4
G
1
Posts: 6
Reputation: 513


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, Magistross, mallorcaredes, PavleNikolic and 23 guests