Random pick from family or animation

0 favourites
  • 2 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Let's say i have 4 diffent sq's: red, blue, green, yellow. I want to randomly spawn 2 of those sq's of different colors. When each one is destroyed i want to randomly spawn 2 more.

    Is it better to randomly choose those sq's from a family, or from an animatimation?

    Also, are creating families only used to simplify creating events for those same kind of sprites?

    Thanks for any input.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jeffige

    you can easily do it either way...

    with animations, create the object, and then Set Animation to: Choose("red", "blue", "green", "yellow")

    (assuming those are the names of the animations obviously)

    if you put 4 different objects in a family, then Create family object will randomly choose one of the types for you.

    So, if the objects are vastly different from each other - with lots of different properties, then the family way is easier.

    But it they are mostly the same, except for the animation, then that way works fine too.

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