Spawn another object issue. Sprite and SVG object in container.

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!
  • I have 2 objects in the container:

    - Sprite (with Physics behavior)

    - SVG (with Pin behavior). In the events sheet, it is pinned to the invisible Sprite (On start of layout), additionally added as a child to that Sprite.

    When I create condition:

    System Repeat XX times and in the actions choose Sprite2, which is not in the container (action Spawn another object choose a Sprite which is in the container)

    On start of layout, it creates only instances for Sprite from the container but does not create instances for SVG object that is also there.

    Do I do something wrong?

    Tagged:

  • On start of layout, it creates only instances for Sprite from the container but does not create instances for SVG object that is also there. Can you rephrase?

  • On start of layout, it creates only instances for Sprite from the container but does not create instances for SVG object that is also there. Can you rephrase?

    "On start of layout" has sub-event "Repeat 100 times", which has an action "Spawn another object".

    In the Manual for containers are such sentences:

    - If one object in a container is created, every other object in its container is also automatically created.

    - If a condition picks one object in a container, every other associated object in its container is also picked.

    When I use the action "Spawn another object" and choose the Sprite object which is in the container it creates only 100 instances for the Sprite (I see it in debug layout).

    As far as I understand from the manual, the system must also create 100 instances for SVG object, because it is in the same container with a Sprite, but it does not happen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It should work how you describe, check in debug view if the instances have increased. Maybe they exist but you can't see them for some reason. If there are some SVG created then you can pick them from the inspector and see where they are. If they definitely haven't appeared then please share the project :)

  • It should work how you describe, check in debug view if the instances have increased. Maybe they exist but you can't see them for some reason. If there are some SVG created then you can pick them from the inspector and see where they are. If they definitely haven't appeared then please share the project :)

    You're right. It works. Probably did something wrong before.

    Thanks.

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