Godot Version
godot 4.5.1.stable
Question
how can i make quick time events in godot,something similar to what we see in paper mario and bug fables,where the player have to hit a sequence of inputs and based on that damage is calculated.
thank you
godot 4.5.1.stable
how can i make quick time events in godot,something similar to what we see in paper mario and bug fables,where the player have to hit a sequence of inputs and based on that damage is calculated.
thank you
I recommend starting out by doing some basic tutorials first, so you understand how most part of the engine work. A good starting point is the project shown in the docs:
thanks for the tip but i already made a game and published it on itch.io it was a platformer now i’m aiming to make a turn based game
Then I’m sorry to say but I’m not sure what you expected to find here. Asking for help with specific issues is fine, but if you already made a game and published it, one would expect you understand how basic input handling works in Godot, and how to display UI elements, as well as use basic features to create a QTE. Or did you expect someone to write the whole system for you?
oh don’t worry,i’m just asking for the logic on how to make one,as there is a clear lack of tutorials on them.
Try storing action names in an array, then incrementing an index as the player presses the specified action
signal qte_finished
@export var qte_order: Array[String] = [ "Left", "Right", "Forward", "Back" ]
var qte_index: int = 0
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed(qte_order[qte_index]):
qte_index += 1
if qte_index == qte_order.size():
qte_finished.emit() # done!
set_process_unhandled_input(false) # stop reading qte inputs
Could look at how people do combos for fighting games as a possible source of material.
Add Inputs to the Input map (Project > Input Map) if you haven’t already where each input is what you want to input to the quick time event. (wasd, enter, whatever)
Add a Button Node, and add a child timer node to the button. Add a script to the button that makes it pop up, for only a moment, using the timer to time it.
This is honestly a question you should have just asked chatgpt.
oh thanks ,why i didn’t think of this lol ,also i would imagine that in case of randomizing the actions we would use randomize() to return a value for the index inside a for loop?
oh thanks ,but as for the last part i avoid using ai completely for better learning.
Ai is a good tool for learning. Its matters your mindset, if your just copying you wont learn as well.
but that is honestly respectable.
This algorithm wouldn’t work well with randomize()'d indices. This line requires the index to match the total size of the array, which will happen after it’s gone through every provided action. with randomized index it could happen immediately after the first qte, or infinitely long.
If you want to randomize the qtes I’d recommend using .shuffle on the array, not the index. With shuffle the index still ensures every action is processed at least once.
func _ready() -> void:
qte_order.shuffle()
oh thank you so much for the help,this is really helpful