Can I specify different instance variables?

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I am creating a study game in which different parts of an image are labeled. So far, my best guess as how to indicate the parts of the labels is with a sprite at each point. My plan was to give each sprite a different value for an instance variable and use these numbers in matching - at least this was my plan before I realized that changing the initial instance variable for one sprite changed it for all instances.

    Is it possible to set different values? Do you know of a better solution?

    (It is not possible to create multiple collision polygons for one sprite, correct?)

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's not quite right, changing an instance variable does not automatically affect all instances. It only affects instances that matched the event's conditions. To only affect certain instances, make sure your conditions only apply to the instances you want to affect. More information in How events work.

  • Thanks for the reply. I wasn't quite clear with my question. What I want to do is be able to assign a different, specific number in each instance based on where it is in the layout. The sprites are positioned at specific points relative to a background image, and I want to be able to identify the sprite that is at that specific point. The number assigned to a specific sprite should not change in any events.   Am I going about this completely the wrong way? (Do you understand what I'm trying to accomplish and have an alternative to suggest?)

    Thanks again.

  • Never mind! I think I have this working.

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