On Collision Creating Object on Start of Layout

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

    I have code "sprite 1 on collision with sprite 2 (system) create object sprite 3". This is the only code that concerns creating the object "sprite 3", but instead of simply creating the object on collision, Construct 3 creates the object on start of layout and then also on collision. I can find no way of fixing this as I have checked and rechecked code and nothing is telling the object to create on start of layout.

    Thanks for any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey acousticputty,

    To create a Sprite, it needs to be placed on a layout at least one time. Where did you place it? I guess it is the one you see when starting your layout. You can either create a separate layout to collect all your objects or you place Sprite 3 outside of your layout. In addition you can give it the 'Destroy outside of Layout' behavior or you can destroy it on start of layout.

  • Thanks so much I already had the 'destroy on layout' behavior set, but I was a dummy and the sprite was inside the layout on the start of the game. I moved it outside of the layout and it stopped happening. Thanks for taking time to answer my dumb question and help.

    Also, your idea of using a separate layout for sprites is right on. I'm in the process learning Construct, and in that, I am learning how to keep things better organized and your suggestion is perfect for that.

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