Hello.
I am making a game where you remove randomly generated objects by touching the corresponding colored buttons. What conditions should I create to determine which object is located at the bottom among the generated objects?
If we are talking about removing them from bottom (so biggest one 1st)
For example looking at your image then closest to player or to bottom of screen is blue then i see purple then blue and then two yellow
So pressing purple arrow would remove 2nd object since that is first purple object i see
Then you could simply go with one parent event and 3 sub events
In parent event you would add condition pick object that is nearest to
CameraCenterX() CameraBorderBottom()
In 3 sub events you would go with
Purple arrow is pressed
Animation of object = purple
Trigger once
Delete object
Which would in this case delete purple object closest to player
And two other sub events would be exactly the same just for other animations of object and arrows
Determine the object with the smallest Y coordinate value for all objects
Object name: ColorBall
Scene variable: MinY (initial value is 99999, for example)
Temporary object variable: inFront (0 or 1)
Colorball’s color variable is 0,1,2 (blue, yellow, pink)
However, when I click the blue arrow, the blue circle at the very front does not work.
I have one more question.
When the first object is touched with the color arrow, the second object comes to the front, and if I want to add a random object to the 10th last position, what event should I use?
(While maintaining 10 circles, when the correct answer is given by touching the front circle, the position moves by one + 1 circle from the back, the 10th circle, is randomly created)
I would go with same exact condition but from top
I would check closest NOT BY COLOR but any circle to camera border top
And there spawn additional one