Can I specify different instance variables?

Get help using Construct 2

Post » Fri Oct 19, 2012 11:41 am

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!
B
3
Posts: 3
Reputation: 331

Post » Fri Oct 19, 2012 1:25 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Oct 20, 2012 3:14 am

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.
B
3
Posts: 3
Reputation: 331

Post » Sat Oct 20, 2012 5:20 am

Never mind! I think I have this working.
B
3
Posts: 3
Reputation: 331


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, abdalghani, Ethan, Marxally, Naightwolf and 28 guests