How do I select each object in a family with a loop?

Get help using Construct 2

Post » Fri Feb 06, 2015 1:55 am

I'm trying to create a menu at the top of the screen with objects that already exist in a family. Is there a way to create one of each object in a family? Here's the event that has me stumped.

MenuIssue.PNG


Any insight or suggestions would be awesome!
You do not have the required permissions to view the files attached to this post.
B
11
S
2
Posts: 28
Reputation: 704

Post » Fri Feb 06, 2015 2:00 am

You cant do that, you have to create each of them individually or use a plugin, Can't remember what its called. :(
Otherwise you can create the menu off screen during design time, and just pin them together and move the parent object to correct place. Assuming its a menu that is not suppose to be there all the time?
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Fri Feb 06, 2015 2:09 am

Thanks for the heads up. I just found out that Families are just virtual containers, so it was a lost cause! At any rate, just as you suggested, I'm creating the objects individually, its just a big copy-paste party :)
B
11
S
2
Posts: 28
Reputation: 704

Post » Fri Feb 06, 2015 2:13 am

This is closer to what a container would do for you, because you just create one of the object instances and the others get created for you. You can't directly find out the types of object in a Family AFAIK. However there *are* ways of doing it indirectly. If you want to go 3rd party you could use the Nickname plugin.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Feb 06, 2015 5:40 am

Since the menu was super simple, I just created a sprite with the first animation frame from each object and loopindexed the creation and placement. It worked like a charm! Thank you all for the help!
B
11
S
2
Posts: 28
Reputation: 704


Return to How do I....?

Who is online

Users browsing this forum: Ajbael, Pulstar and 9 guests