Hello there.
I am trying to create a game like the image.
when the initial game scene starts, 10 randomly generated objects of 2 colors are spawned at regular intervals from spawn point Y200
the correct answer is determined by touching the left or right button that matches the color of the lowest object (judgment line).
if the answer is correct, the colored object disappears, the colored objects above it descend, and a 10th new random colored object is created at the spawn point behind it.
I don’t know how to start generating random objects at 1 interval, please help.
BUT let’s assume its one object with different animation
So 0 is red ears
Animation 1 is white hair
You can use repeat event
Just right click add and choose REPEAT
You also need number variable for example scene variable let’s call it Adv
Now make event
Condition
At beginning of the scene
Action
Change Adv set to 1
Now make repeat event as sub event of above event
And in repeat set it to 10
Leave condition empty
In Action
Create Object at X CameraCenterX() Y 200 + (20 * Adv)
Change Object scale set to Object.Scale() * Adv
Change Animation of Object set to RandomInRange(0,1)
Change variable Adv add 1
Now there is condition to pick nearest object to position
So pick nearest object to CameraCenterX() CameraBorderBottom()
Action
And here you need to set SOMETHING to Object.Animation::Index()
Thanks to you, I’ve been able to list the objects and even change their sizes. However, I’ve run into a problem where the objects at the very back are spaced out a lot.
This is just matter of by how much you multiply distance
Create Object at X CameraCenterX() Y 200 + (20 * Adv)
or
Create Object at X CameraCenterX() Y 200 + (5 * Adv)
Or add change Y pos action right under create object action
Create Object at X CameraCenterX() Y 200
Change Object Y position to Object.Y() + Object.Height()
Or maybe more sense would be
Create Object at X CameraCenterX() Y 200
Change Object Y position to Object.Y() + Object.Height()/2