Family - spawn another object

  • I have a family that contains several sprites, I want to duplicate the sprite that is touched with the touch. I used the method spawns another object, but this creates a sprite in the family, but random and not really what I have touched.

    Could you tell me the correct way, thanks.

  • There are many way's to do this.

    You can make it without a family, on object touched - create the same object.

    Also you can add instance variable to the family, and set the sprites to different numbers.

    On family touched

    ---sub event - family instance = 1 ------ create sprite holds instance 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is ok, but I want to manage it with families or anything else because I want to say that when one of the sprites, which belong to a group, is touched, then I have to create a duplicate of that sprite. I want to manage it massively and not making a control for each sprite, ok? You can encode in this way? How?

    Thanks for letting me respond

  • To my knowledge, there is no native "Create Object" action that lets you spawn using a name, which is what you'd need to implement it the way you want.

    However, I did come across this plugin by rexrainbow, that might help you:

    I've never used it, so I don't know, but essentially if you can get the nickname of the Family instance, and then Create object by that Nickname, you'd have what you need.

  • Excellent Dalal, you've been a great help. Forgive my English, I'm Italian. I now I try this plugin and will announce the result .... thanks you're a friend

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