Same object in multiple containers?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi all,

    Is there any reason why I can't use the same object in multiple containers? Seems like a strange limitation?

  • That would essentially be one container for all the objects.

    So if one object (doesn't really matter which one) is destroyed then they all are.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • newt I'm not sure I follow.

    Say you have two motorbike objects (red and green) and a single character object. If you add the character object to the red motorbike container, you can not add it to the green motorbike container.

    The use case is hypothetical but explains my conundrum.

  • Yes, that would place both motorcycles in the container along with the rider. Its like an unbreakable chain.

    What you are wanting is something like the Object Pairer from Construct Classic. It could pair objects together for picking without the creation/destruction issues. I think its on the todo list.

    The work around for now is storing the corresponding objects uid in an instance variable.

    You can also try using IID, but that can get messy.

    Or are you confused by the fact that you can not use one object as a parent if the other objects are already in a container?

    I know I am.

  • Or are you confused by the fact that you can not use one object as a parent if the other objects are already in a container?

    I know I am.

    Exactly! :)

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