How do I make a game end after the player does a task?

I’m making micro games and how do I make the task being complete end the game?

Example: Once the player sorts all the triangles and circles into the proper crates before the timer runs out, the game should end.

If you mean in your game you can move triangles and circle to any circles

You can make two variables
One for box 1 and other for box 2
And check if box 1 is collision collision with triangles
Pick all instances of triangles and then in action set variable for box 1 to picked instances of triangles
It should count only triangles that are in collision with box 1
And you do the same for box 2 but for circles and variable 2

And now you just check if variable 1 and 2 both = 3
If so in action you end your game however you want

Ok thanks, I’ll try this.

There are other methods depending on what you do with the shapes when they’re dropped in the box. If they stay on screen, then @ZeroX4’s suggestion will work. The only drawback would be that the target number is hardcoded - if it changes, then the number has to be updated. There are ways around this though.

However, if you delete the shapes as they are placed then you can use the number of objects in the scene condition:

image

This allows for different numbers of shapes in the scene without having to change the values in events.

1 Like

I’ll try this too thanks