Initially, x tickets are given, and I want to stop the game when it reaches 0 tickets. What features should I put in this case? I am using a label by hand, but a limit is felt.
Does your app work something like this:
- Start with some tickets
- Spend a ticket every time you play the game
- When you are out of tickets, you can’t play the game (and you have some system for earning more tickets)
This is not very different in effect to having a timer in your app. You have a number, it’s counting down, and when the number is at 0 the game is over.
If you check out this Thunkable Clicker app, you can see how the game ends when the timer expires.
Where this app refers to a variable called ‘time’, you can use a variable called ‘tickets’. Instead of reducing this variable by 1 when a Timer fires, do this when the user starts a new game.
Let me know if you have any questions about this!