Make objects randomly generated?

Get help using Construct 2

Post » Wed Apr 15, 2015 12:27 pm

Hi, so here is a short video demonstration of the game I'm working on.

https://www.youtube.com/watch?v=OpQrn6aBDTI

Now while the game is going well, I would like to have a mode that randomly generates the numbers in the scene (each number is a sprite object). How do I do this? Not to mention, how do I do this in a way that all of the Numbers can be reached? (So they're not all flying too high in the air).

Thank You!
B
7
S
1
Posts: 33
Reputation: 489

Post » Wed Apr 15, 2015 12:42 pm

When creating set the y coordinate to random(minimumY, maximumY)
with minimumY being the height needed to pass underneath and maximumY being the maximum height reachable by jumping.

Instead of using many sprite-objects you could use one and just have the numbers be animationframes.
That way in the calculation you could use the framenumber.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 15, 2015 1:57 pm

yeap..just one sprite for numbers...

capx:
http://s000.tinyupload.com/index.php?fi ... 6119945129
Image
B
62
S
23
G
7
Posts: 1,469
Reputation: 10,729


Return to How do I....?

Who is online

Users browsing this forum: alextro, Soulmachine and 9 guests