create a object out of a group of other objects?

0 favourites
  • 2 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • If you have something like a single bingo card(ticket), it consists of 25 hand placed text or sprites representing the numbers, plus back ground images, daubed state etc.

    If you have a variable number of cards, it makes sense to create one card,then clone it at runtime (depending on how many they purchased) and put them in different locations.

    I.e. you are making a new object (the bingo card) out of lots of smaller objects.

    Is there a way to do this?

    I tried using families, but this fails because:

    1) you can only put the same type of object in a family. e.g. only sprites

    2) you cant seem to clone a family and change its position (at least i could not work out how.

    I saw you can put objects into a container, but:

    a) I dont know what the container object should be (there dont seem to be any container type objects)

    b) Once you have a container object, I dont know if you can clone it to create complete copies, and access their sub objects.

    Even nicer would be if you could associate events/behaviour with this composite object, like you would in an object oriented language. E.g. so you could say something like "foreach (bingocard) {bingocard.generateRandomNumbers()}.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To use a container, click an object to view it's properties. You will see Container below Effects.

    Now click Create.

    A window will pop up asking you to add other objects to the Container. You can add/remove objects at any time.

    When ever you create any object in a Container, Construct will create all the other objects in the Container automatically.

    When any object in a Container is "picked", all other objects in the Container are also picked.

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