Alternate to UID to controlling cloned sprites?

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Just use the "Compare instance variable" condition to pick a certain instance.

    The event will look like this:

    Sprite: testvar=1

  • Thank you so much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)