How do I clone a single object in the Family?

0 favourites
  • 2 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I have 3 singles sprites in a single family:

    Sprite1,

    Sprite2,

    Sprite.

    I want to click in a single sprite on the layout, example: i clicked in Sprite1. I want to clone him! I want to spawn another Sprite 1, but i clicked on the family... How do i spawn in a object?

    I did this:

    And it doest work! It's creating a random instance object of family... i want just create the object i have clicked!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If it's always clicking on Sprite 1 to spawn Sprite 1, then you use click on Sprite 1 spawn Sprite 1. If it's clicking on any Sprite in the family to spawn Sprite 1 then you can keep it as clicking on Family and then specifically spawn Sprite 1.

    The inverted overlap is a good use of the family because you don't have to say is not overlapping Sprite1, is not overlapping Sprite 2. That's pretty much what the families are for, cutting down on redundant code.

    Only pick the family when it can be any of the family. In your scenario above it has to be Sprite 1 so you've got to pick the individual object with the create action.

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