Question about Families

Discussion and feedback on Construct 2

Post » Tue Aug 14, 2012 5:18 am

If I have a Sprite Object that is in 2 Families, FamilyOne, and FamilyTwo, and I have a tick event assigned for collision in FamilyOne, how can I select the Picked Objects variables that it inherits from FamilyTwo?

Thanks
B
6
S
1
Posts: 31
Reputation: 1,237

Post » Tue Aug 14, 2012 1:44 pm

I'm afraid you can't do this - you need to make sure any variables you want to access from FamilyOne are variables in FamilyOne and not any other families.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Thu Aug 16, 2012 12:18 am

Dang. So if I am having an Event with FamilyOne, I can't pick the same object from FamilyTwo by its UID or anything? Thanks
B
6
S
1
Posts: 31
Reputation: 1,237

Post » Thu Aug 16, 2012 2:26 am

The question here being "can we get multiple inheritance with families? How?"
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Fri Aug 17, 2012 11:43 pm

@Skillasaurus

When you say:
"Dang. So if I am having an Event with FamilyOne, I can't pick the same object from FamilyTwo by its UID or anything? Thanks"

Do you mean there are various objects assigned to two familed. Something happens to One object from FamilyOne. You want to pick that object to then apply events applicable to FamilyTwo for that object?

Or do you mean, if FamilyOne and FamilyTwo collide and the objects are both assigned to FamilyOne and FamilyTwo, how do I identify between them?Andeming2012-08-17 23:44:42
B
85
S
31
G
14
Posts: 106
Reputation: 16,440

Post » Sat Aug 18, 2012 2:35 pm

You need to adjust your use of families to more accurately reflect what they do. You can't use FamilyOne and then switch to FamilyTwo in the same event - they are picked separately. Consider adding 3 or 4 families which cover all the cases you need. Then you can make an event using FamilyThree throughout, for example.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578


Return to Construct 2 General

Who is online

Users browsing this forum: glerikud and 10 guests