fallilng objects game

Get help using Construct 2

Post » Wed Aug 21, 2013 4:36 am

Hi, i have this game where every 1 second, a object drops and the player catches it.

If i have more than 20 different objects, how do i randomly spawn one of the 20 objects? What's the best method?
B
9
S
1
Posts: 80
Reputation: 687

Post » Wed Aug 21, 2013 5:35 am

Depends how your objects are setup.

One way would be to create 1 sprite with each object being a different animation frame.

Then you can spawn it using random like
Create Object
Set Animation Frame to int(random(20))


Or, you can put the objects into a family and by spawning/creating the family, C2 will automatically spawn a random object from that family.



ArcadEd2013-08-21 05:37:25
B
101
S
32
G
11
Posts: 1,552
Reputation: 21,667

Post » Thu Aug 22, 2013 6:23 am

thanks!
B
9
S
1
Posts: 80
Reputation: 687


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 4 guests