Help with Family and different layouts

Discussion and feedback on Construct 2

Post » Thu Sep 19, 2013 10:37 pm

Please i'm trying to do something with objects ina a family, such that ob dragging an object in a layoout, using the id of the object selected, only that object is set visible in the next layout. I thought families should be able to handle this perfectly but it seems not to be working and i've been on it for a while.

here is a link to an example of what i want to do


family test
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Thu Sep 19, 2013 11:21 pm

Every instance has it's own UID. The sprites on layout 2 have different UIDs to the sprites on layout 1.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Fri Sep 20, 2013 10:37 am

Okk, how can I then handle this problem?
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Fri Sep 20, 2013 5:04 pm

Well you could make the objects on layout 1 global so that they persist onto layout 2. famTest1.capx

Or you could give the objects a 'name' instance variable to track which ones you want to show/hide. famTest2.capx
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Sat Sep 21, 2013 8:23 pm

@ramones, thanks a lot test2 works peefectly for me.
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Tue Sep 29, 2015 2:53 pm

ramones wrote:Well you could make the objects on layout 1 global so that they persist onto layout2


DUDE! -- thank you !!!! this has been the bane of my existence for 2 days now!!
B
9
S
2
G
1
Posts: 17
Reputation: 669


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 20 guests