How do I spawn an object based on Instance Variable?

  • I need to know how to spawn an object based on there instance variable. Here is how I want it to be set up:

    You set the instance variable of an object (obj1). When you click on the obj1, the obj1 should search a family for a object (obj2) that has the same instance variable as it. Once it finds it, it spawns it.

    That it's how I want it to work.

    In reality, it doesn't do that, it spawns an object from the family at random. Can you help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need this plugin.

    The object created by the create action can not be influenced by any condition.

    If you create a family, it picks a random from that family to create.

  • You need this plugin.

    The object created by the create action can not be influenced by any condition.

    If you create a family, it picks a random from that family to create.

    Thanks!

    I'll try it out and see if it fixes my problem.

    I'll tell you if it does.

  • You need this plugin.

    The object created by the create action can not be influenced by any condition.

    If you create a family, it picks a random from that family to create.

    It worked! Thank you!

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