How do I get container to respect the items position ?

0 favourites
  • 5 posts
From the Asset Store
A well commented Dynamic Heart Containers template to learn from or to use as a base for your own game!
  • How do I get container to respect the items position ?

    When I instantiate the a container with the items, they are ALL in the center of the container.

    When I try to duplicate them in a loop, and try to move all the items to their respective relative position, the WHOLE container move !

    How do I get container to either:

    1: Create the Container instance with all the item's position in place like every OOP program out there.

    or

    2: Move the individual items inside the container wihout the whole container moving ?

  • If you move one item in a container, it shouldn't move any others. If it is, then something else is causing it (are they pinned together?).

    When an item in a container is created, it will create all the other items in the container as well. You can create one item, and then create an event: On created, where you can position the other items relatively.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, but what if during "on Create" some items in the container are not created yet ? Like for example there are five controls and the first control was JUST created and inside its onCreate Code, there are codes to control the position of everything else in the container but in that nano second, they are not yet created ?

  • If you create one object that is part of a container, every other object that is a part of the container will have been created at the same time. You won't have an issue where something wasn't created yet, unless I'm misunderstanding your situation.

  • Thank you !!!!!!!!!!

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