How do I created an object based on family member created

0 favourites
  • 3 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hello,

    I have 2 objects in my family.

    Object 1

    Object 2

    Is it possible to create another specific object if Object 1 is created?

    I want different objects is created based on the Object # in the family

    This is the method I tried but doesnt work

    System > On start of layout > Create Family (This spawned one of the Object randomly)

    Object 1 > On Created > Create text_object1

    Problem with this is that when Object 2 is created, it also created the same text_object1

    Tagged:

  • If I'm understanding correctly what you are tring to do here then the best way is to put Object 1 in a container with the other objects you want to spawn with Object 1, and the same for Object 2. Then when Object 1 is randomly created it will spawn the other objects automatically.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • System - On start of layout - Create Family (This spawned one of the Object randomly)

    Object 1 - On Created - Create text_object1

    Problem with this is that when Object 2 is created, it also created the same text_object1

    That code should work correctly. Are you sure you are using "Object1 On Created" and not "Family On Created" event?

    Another option is to use "System Pick Last Created Family" condition and then check Family.ObjectTypeName expression

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