Pin objects together at design time/create "prefabs"?

0 favourites
  • 7 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • What I'm looking for is the ability to group objects like sprites and text under a single parent - to create a Unity-style prefab or Flash-style movieclip that retains the relative positions of the objects it contains. Ideally the parent would then treat these child objects as properties and expose them to event scripting. Is there any way to pin objects together at design time this way? The closest things I've found are the pin behavior and the container property, but neither of those does quite what I need.

    I scoured the forums and examples for awhile now looking for the answer, but based on what I could find this concept doesn't (yet) exist in Construct 2. Hopefully I'm wrong though - thanks!

  • Pin behavior what you are looking for, even if you can't access directly the childls, but you can for example store the childs UID into some parent's variables and then access it easily.

  • Thank you Joskin, the UID idea is something I hadn't considered and sounds useful! I'll have to try that.

    However it isn't really a replacement for the ability to piece objects together at design time in a prefab/template style. The ability to nest objects at design time to create composite objects is a very powerful feature that would benefit many Construct 2 users, but I have no idea how difficult it would be to implement on the dev side. It is probably quite a bit of work.

    Still, if I can't find a way to do it soon, I'll head over to the general discussion and request it as a feature. Can't hurt to ask, right?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I asked for this ages ago. Not on the list of things to do as far as i know.

  • Like spongehammer i asked for this a long time ago too, but Ashley said it wasn't needed because we can just then PIN. I even made a long post how Containers should optionally just use XY pinning by default with out the need of the Behaviour, but it's not going to happen.

    It's crummy.

    the easiest thing you can do. Is add all the parts of your container into a Family. Then select the root parent by whatever condition. Then select the Family by he same condition(ie give the Family a unique name) Then Pin the Family to the parent. The problem with this is that there is no mutual family where you can mix objects. families need to be of one type

    I wold love a Family of multi type

  • Well in theory you could do it with a plug.

    That is essentially what Spriter does.

  • Thanks for the responses! I figure the more people that request it the more likely it will be seriously considered, so I'll go ahead and put in a feature request too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)