In my experience, if you are going to use: is_action_pressed, you should to use: is_action_released, as well. I have a run function that I use for my character that I use when I hold down my "alt" key, the run function is performed and when the key is released, the walk function resumes. Best way to do it, nothing left to chance.
3 months ago
| 0
I really love the explanations of what the other choices do, not only does it help teach the difference between them and the answer but we also learn what those do too 🔥
3 months ago
| 0
Thank you, now I know more. And you deserve more. I wish you to reach 100,000 subscribers and more. And... I answered incorrectly.. I chose option A. I probably should have translated the question in the translator right away, because I live in Russia, but I know English very well, but not completely. I thought that the question was about what is responsible for pressing the key, but not which is responsible for holding it. Okay, no matter, everyone makes mistakes. Greetings from Russia :) 👋
2 weeks ago
| 0
(perhaps an) interesting fact: If you add a node "CharacterBody2D" and attach a script to it (if anything, we include a script template), then in the script, when the "move left" event occurs, there will be a condition Input.is_action_just_pressed("ui_left"), and then and is_on_floor() will be written. As for me, this part is responsible for "holding down the key". Only when I specified this " and is_on_floor()" in another script, I got an error🥲
2 weeks ago | 0
Game Dev for Noobs
Inside _physics_process(delta) in Godot 4.4, you want to apply a continuous force to your spaceship only while the "thrust_forward" input action is actively being held down by the player. Which method on the global Input singleton is best suited for this?
3 months ago | [YT] | 15