How do I assign a value to only an object of a family?

Just started using Construct 2? Post your questions here

Post » Fri Jan 15, 2016 11:38 am

if I want to assign a variable value to only the object of a family I'm currently performing an event how do I do? for example on mouse click on an object I want to assign it a variable value and the other objects of the family have the same variable but I don't want to affect them at the same time.
B
13
S
5
Posts: 55
Reputation: 1,085

Post » Fri Jan 15, 2016 12:46 pm

Click on the object and use an instance variable
B
7
Posts: 16
Reputation: 313

Post » Fri Jan 15, 2016 2:04 pm

In the mouse click event, only that object will be picked, so you can do whatever you want to just that picked object. You have to go out of your way for that not to work.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Sat Jan 16, 2016 8:57 am

Make the object picked, on the condition of the event. You could pick it by comparing its UID, IID(nth instance), or position or its own instance variable, many ways.
+Oh you mean an Object in a Family... sorry I was telling about an Instance of an Object. For what you're saying, just change the (family) instance variable of that object, and only that one's will be changed.
B
13
S
2
Posts: 31
Reputation: 862


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests