What is the best way to make an order ticket system?

Godot Version

v4.4.1

Question

Hi,
I’m working on a cooking game and I’m a bit confused about how to create an order ticket system.

I want it to work similarly to the ticket system in Overcooked, where orders appear one by one with an image and a progress bar showing the time limit. There can be up to 5 tickets at once. When an order is either completed or failed, the ticket disappears and a new one takes its place. All the tickets should appear in a specific area of the screen.

What would be the best way to implement this system in Godot?

Thanks!

“Best” is subjective and heavily depends on your requirements. I’m unfamiliar with Overcooked and don’t know what constitutes a fulfilled order (is it one dish? Can a ticket have multiple items on it? Do I also have to deliver what’s on the ticket to a specific table for the order to complete?), so I’ll focus on the progress bar, time limit, and ‘order failed’ parts.

Godot provides something called a TextureProgressBar out of the box. You give it three images (a background, the part of the bar that moves, and an overlay), a max_value, and what its current value is. If max_value is 100 and value is 50, half of the bar will be filled. If max_value is 100 and value is 25, a quarter will be filled, etcetera.

If you make a TextureProgressBar scene and add a Timer child node, you can connect the Timer’s timeout signal to some function that subtracts some constant number from TextureProgressBar’s value. i.e. if value starts at 100, you could subtract 1 point every second.

Failing to complete the ticket is then a matter of checking if value ever drops to 0, which is when you can call queue_free to delete the ticket.

1 Like

Hey, brother, I don’t know how to create posts, so I’m here to ask you, how can I make the animation play completely? Every time I press the button, it only plays the first frame, and then it goes back to the first frame of the initial animation.Or what method should I use to achieve its complete playback.Thank you. I hope you don’t mind my asking.


You can make new threads by clicking on ‘new topic’ (see upper-right corner of the picture below for its location.)

As to what causes the animation to play only its first frame, that is unfortunately impossible to tell from the information provided. My guess is that the play method is called from _process and is immediately overwritten on the next frame, but this is a guess based on incomplete information.

Please consider posting an actual thread, and include all relevant code and the error messages that Godot throws. (Clicking on the red and yellow text at the bottom will show these errors.) And please, instead of showing a picture of your screen, post the code as pre-formatted text. I.e. enclose your code with three backticks (```), like this:

Screenshot from 2025-04-30 18-51-24

Posting code like that will preserve indentation, which is not ornamental in GDScript as it is in other languages, and the website will render it like this:

func _ready()->void: ...

(People are generally much more willing to answer questions if they can copy and run code for themselves.)

One way of making your ticket system would be a VBoxContainer to hold the list, and make each list item a little scene containing (probably) an icon, a progress bar and a text label. Maybe something like:

HBoxContainer
    TextureRect (Icon)
    VBoxContainer
        Label (Order description)
        ProgressBar

If you attach a script to that scene you can have each one interdependently updating. Add/remove them to/from the VBoxContainer and it will stack them on the screen for you.

There are other ways of doing this, but I think if I wanted to build an order ticket system in Godot this would be what I’d try first.

Thank you for your answer. :smiling_face_with_three_hearts:

:sob: :sob:I gave up. After all, I’m just a beginner. Maybe I can make the game simpler. If I bring new problems next time, it’s simple for you but a big problem for me. I hope you can help me more!

Don’t quit just yet; you’re likely to get help if you post the question in the manner described earlier.

The problem probably isn’t all that difficult to solve – if we have the proper information. Asking for help on message boards is very much a “Help Me Help You” kind of thing. The more relevant information you provide (in the correct format), the better the answers you tend to get.