Questions tagged [godot4]

for questions regarding usage of the Godot game engine, specifically version 4.0+

Recently, the Godot Game Engine released version 4.0. This major release brought many changes to how things are done in the engine including removing and adding various configuration options, as well as changes to their scripting language, GDScript.

Because version 3.5 is still in use, this tag allows users to specify that their question is about using version 4.0.

130 questions
1
vote
0 answers

Tween a node's rotation from nearest direction

I'm spining an entity through the Tween type: if (this._direction != AutomobileDirection.Up) { if (this._rotationTweenIsActive()) { this._stopRotationTween(); } this._direction = AutomobileDirection.Up; …
Hydroper
  • 344
  • 2
  • 9
1
vote
0 answers

Why is my create_timer() with a variable argument not using the correct amount of time?

In Godot 4.0.2 while making a platformer game, I'm using this code to create a coyote time effect, where moving off a platform still allows the character to jump for a short time while in midair. Using create_timer() with a float argument works as…
1
vote
1 answer

How to check for mouse click on Area2D in Godot 4?

How do I detect mouse clicks/mouse events in an Area2D's script? Do I use the func _process(delta) function? Let's say I have an area 2D called area. So what should the script be like? I want something like this: extends Area2D func…
Coding_Guy
  • 160
  • 9
1
vote
1 answer

TextureProgressBar's progress_texture Doesn't Advance When Its value is Changed

I am working in Godot 4.0, and having issues with the TextureProgressBar. In order to recreate this issue, make a new project, create a new scene as a Node2D, and add the children Timer and CanvasLayer. Then give the CanvasLayer its own child, a…
Frasher Gray
  • 222
  • 2
  • 14
1
vote
1 answer

How Can I Get The Global Position Of A Node3D In Godot 4.0?

I want to position one node to another, but they are under different parent nodes. How can I set one of the node's position to the other's, without interfering with the parent nodes' positions? Btw, the node3d with the position i'm trying to find…
1
vote
1 answer

Too many arguments for "move_and_slide()" call. Expected at most 0 but received 1

So, I was following a tutorial for making my enemy move towards my player, and there comes a part of the script where its calls a "Move_Slide" so the enemy can move, but I get the error. Heres my full code: extends CharacterBody2D # Movement…
Bad Dev
  • 15
  • 4
1
vote
1 answer

How do I play a gif in godot4?

I want to play a simple gif in my godot4 project. Let's say that I have a gif file named video.gif. How do I play it using GDscript? Which component would play a gif? If I can't play a gif, can I play a video file? If I also can't do that, how can I…
Coding_Guy
  • 160
  • 9
0
votes
1 answer

Is It Better To Use Multiple Dictionaries or One Dictionary With Each Key Being Tied to an Array?

In my Godot project, I'm going to have txt files store information the game needs to have access to. Would it be better to inscribe that information into a single dictionary, with every key associated with an array (for example, {"Building 1": [100,…
Frasher Gray
  • 222
  • 2
  • 14
0
votes
1 answer

Find Area node is collided is celling, floor or wall in godot4

I have a area node in godot4 which can scale up and down and also rotate. there are celling, floor and wall in scene, my area node place between them and can scale up, when this area got bigger can collide with other areas like floor, wall or…
ehsan
  • 1
0
votes
1 answer

(Godot4). IsOnFloor() always returns false even though my sprite is in contact with the tiles?

Whenever I run my project my sprite cannot jump because the IsOnFloor() method always returns false although my character is still in contact with the tiles. I very new to Godot so any help to configure my collision settings ? would be very…
Sreyas
  • 1
0
votes
0 answers

Why is HUD over another UI?

I'm instantiating an UI dynamically under $ui. The issue is that chat_button is rendered over $ui, even though the layers are set to be 1 ($hud) and 10 ($ui) respectively. Since chat_button itself is not focusable when I open my chat, which makes…
Hydroper
  • 344
  • 2
  • 9
0
votes
1 answer

How To Change Enemy Speed or make it stop after a few second from spawning. and moving again after a few second in GDscript

I don't Know How to Make The Enemy change speed or not moving after a few second here my code extends CharacterBody3D const speed = - 1 func _ready(): pass # Replace with function body. func _physics_process(delta): position +=…
0
votes
0 answers

2D arrow-based force

I've implemented a top-down car movement based on arrows that works OK, but I'm unsatisfied because the drift doesn't form a big enough circle. The car has one of 8 directions: west (left), east (right), north (up), south (down), northwest…
Hydroper
  • 344
  • 2
  • 9
0
votes
0 answers

Tweened object has false global_position

I'm creating a player tracker that stays behind the player by a few seconds. I intend on having an enemy follow this tracker since I don't want it charging straight at the player. I figured the best way to have the tracker follow the player was with…
0
votes
0 answers

Use MultiplayerSynchronizer via a script Godot 4

here I would like to know if it is possible to use the MultiplayerSynchronizer node via a script because I make instances of scenes and I would then like to synchronize these instances, If it is impossible to use MultiplayerSynchronizer via a script…
TiasMa
  • 1
  • 1
1 2
3
8 9