How do I pick a specfic object from a family

0 favourites
  • 7 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Aight so, this only works if all instances under this family meet the condition i put, how do i make the code happen just to a specific instance from a family?

    this:

  • Use 'Create object (by name)' for creating spesific object type.

  • Vissca Do you mean a specific instance, or a specific object (member of the family)?

    You can pick an instance by UID, by instance variable value, or using many other conditions.

    If you want to pick specific objects, say only "RottenZombie" sprites, you can use this condition:

    System Pick Zombies By Evaluate (Zombies.ObjectTypeName="RottenZombie")

    Note that ObjectTypeName expression doesn't work in Construct 2.

  • Specific member of the family, it just breaks if like, 2 or more zombies meet the same condition, so if 2 of them finish the animation at the same time, they just stop moving forever.

    I tweaked my code a bit with the instance UID and it sorta works now, the only problem is that if again, if 2 or more zombies are playing the same frame, they stop moving.

  • The 3 ones at the far right never move, they were created after the zombie to the left, which is moving the way i want it to.

  • It's far easier to create & set an instance boolean for moving zombie. Let's name it "mov". So after summoning zombie set the boolean "mov" to true. Put the movement action with condition is (boolean) "mov" (true)? This way will makes zombie automatically moves as long the boolean "mov" remains true.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could try that out

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