[Solved] Double spawned objects. Solution?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I have an event where

    Object A:On collision with object B, set all objects on layout destroyed.

    I have about 5 different objects on the layout and I put them in a family, where I can destroy them on collision.

    When I restart the layout after that, Object A is spawned twice immediately, instead of just one.

    Is there a solution to this? I thought I already destroyed all objects before the layout restarts.

  • Do you have one instance of the object sitting on the layout to begin with before spawning the others?

    If so make sure you do a

    on start of layout - object destroy

    to clear all instances first.

    its probably just one of your original instances still on the layout

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I sort of came up with a workaround. Basically assign a global variable to them and disable events following collision. That solved the issue in my case. Probably not the best way but it worked somehow.

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