families

For questions about using Classic.

Post » Sun May 24, 2009 9:10 am

If I have several different objects grouped together as a family,is it the case I only have to give say a private variable to one of the objects within that family and the rest of the family group also have that variable?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sun May 24, 2009 9:13 am

No, if you want to use a family variable, use the family manager accessible in the project tab of the ribbon. This can add/remove variables from all objects in a family.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 24, 2009 9:36 am

Thanks for the quick reply .In my game I have a sprite which is not in the family.This sprite can cover 4 of the 9 family objects.I check if the non family sprite is overlapping the family sprites.I then want to set a variable called "selected" for each of the covered sprites to 1 so that I can perform actions on only the covered sprites.I hope I have explained clearly enough.
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sun May 24, 2009 11:01 am

If you want to set a private variable for a family sprite, then make sure it's visible (or add it) via the family manager. Then you can set it via events like any other variable.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 24, 2009 3:50 pm

Try the documentation.

[quote:lwafw3ee]If all objects in a family have a common private variable - must be named the same - effect, or behavior, then it is common to the family, and can be accessed in the event sheet editor. [/quote:lwafw3ee]
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests