Relative Content

Tag Archive for game-developmentgodotgdscript

godot 4 – character keeps jumping when holding jump button

i am creating a 2d platformer in godot 4 and i am running into issues during finetuning of my jump mechanic. when i hold the jump button the character keeps jumping. i want the character only be able to jump again when releasing the jump button and also reseting the jump buffer as the player lands on the floor.

Godot Adding Dash Ability To Player As An Independent Scene

I’m working on a project using the Godot game engine
the project includes player movement and dashing ability
I have a script for the CharacterBody2D that handles player movement and dashing
but I want to make dashing ability independent
can I make another scene with Node node and add a script to it that handles the dashing ability?
if yes, how do I implement it?
do I access the player through dash script or what?
I’m going to share with you the code on CharacterBody2D
if you know how can I split the code into two files, one for player movement and the other for dashing ability please let me know