Random pick from family or animation

Get help using Construct 2

Post » Sat Jul 02, 2016 9:46 pm

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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,112

Post » Sat Jul 02, 2016 10:50 pm

@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.
B
99
S
35
G
20
Posts: 438
Reputation: 17,910


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 20 guests