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
3
votes
1 answer

How to implement a composable character/skill system in the Godot 4.0 Game Engine?

I am currently experimenting with a prototype for a MOBA style game using Godot. I am struggling to figure out a way to manage the characters and their skills. All characters will have similar attributes (Name, health, run speed, strength and so…
Martin
  • 5,954
  • 5
  • 30
  • 46
3
votes
1 answer

How to load game data when restarting a godot4 game?

you know how in games, it saves your data(progress). How do you do that in the godot4 engine? The only way I know how to store data is using variables, but it gets reset when you re-launch the game. Does anyone know anything about this that can…
Coding_Guy
  • 160
  • 9
2
votes
1 answer

Godot 4 : move_and_slide() precision for pixel perfect jumps

I am having trouble in getting precise jump heights using move_and_slide() on Godot 4. I am trying to create a simple but reliable jump for my 2D platformer. Creating the jump parameters comes from this GDC talk. The code I use is the following…
GD Clone
  • 83
  • 6
2
votes
1 answer

Godot 4.1 appears to fire signals twice

I do state appears to, because I do believe I'm missing something obvious. But I've been chasing this problem for quite a while now and I've run out of ideas. I'm basically trying to solve the problem of transitioning between various scenes; and…
Mark Cassidy
  • 5,829
  • 1
  • 22
  • 33
2
votes
1 answer

coding conventions when creating a complex system, I have created a modular weapon system in godot

I have created a modular weapon system in godot 4 but I am sure I have not made this system correctly, so I was looking for feedback on how to do it the correct way or Improve it, I know this question might seem broad to answer but simply put I…
Dragon20C
  • 307
  • 2
  • 11
2
votes
1 answer

Constant rotation tween in Godot 4

Godot's built-in Tween doesn't meet my requirements: It transitions a property's value given a required duration. The tween I want is constant; i.e., it increases with a constant speed. The linear transition doesn't fulfill my requirement. It…
Hydroper
  • 344
  • 2
  • 9
1
vote
1 answer

How to write a static event emitter in GDScript?

Godot doesn't support static signals, so I tried two approaches: Empty Signal: static var my_signal: Signal = Signal() Custom type: static var my_signal: StaticSignal = StaticSignal.new() class_name StaticSignal var _callables: Dictionary func…
Hydroper
  • 344
  • 2
  • 9
1
vote
1 answer

CharacterBody3D.get_slide_collision() returning multiple collisions with same instance in the same position

I am working through the "Squash the Creeps" 3D game tutorial in Godot and I have found that when the player character uses the move_and_slide() method in order to initiate a landing movement on top of an enemy collision mesh that it sometimes…
asheath
  • 13
  • 2
1
vote
0 answers

Disabling Depth Test Gives Weird Artifacts For Complex Meshes

I imported a mesh from Blender 2.90.1 (glTF 2.0 exporter, all transforms applied, normals calced outside) into Godot v4.0.2.stable.official [7a0977ce2] and when setting no_depth_test = true, it seems like Godot enables the manual depth sorting…
B3D4ev_guy
  • 11
  • 1
1
vote
1 answer

How to Loop Map with Godot Engine

The text may be incorrect as it is translated by Deepl Translations. I am currently making a 2D game with the Godot engine, and the map is 1280x1280px, and I would like to make a map with just this one image. The main problem is that when I get to…
Locu
  • 25
  • 4
1
vote
1 answer

Error The following features required to run Godot projects on the Web are missing: Cross Origin Isolation, SharedArrayBuffer

I exported the godot project to HTML5 and after uploading to itch.io I got the error Error The following features required to run Godot projects on the Web are missing: Cross Origin Isolation - Check web server configuration (send correct headers)…
The Rekon
  • 13
  • 3
1
vote
1 answer

Im a beginner On GDScript on godot 4.1

extends CharacterBody2D var mon = Vector2.ZERO func _physics_process(delta): mon = move_and_slide() if Input.is_action_pressed("ui_left"): mon.x = -1 # Set the horizontal speed to -1 elif Input.is_action_pressed("ui_right"): …
ben cc
  • 13
  • 3
1
vote
1 answer

Move object with tween back and forth with Godot 4

I had the following code inside an all_tween_completed signal: func set_tween(): if move_range == 0: return move_range *= -1 var move_tween = get_tree().create_tween() move_tween.tween_property(self, "position:x", …
1
vote
1 answer

Godot 4 is giving me the error of Too many arguments for "connect()" call. Expected at most 3 but received 4, ... ect in

`extends Node2D const SlotClass = preload("res://Inventory/Slot.gd") @onready var inventory_slots = $GridContainer var holding_item = null func _ready(): for inv_slot in inventory_slots.get_children(): inv_slot.connect("gui_input" ,…
Tieuacma
  • 13
  • 2
1
vote
1 answer

How Do I Spawn a new object in Godot 4.x

I'm currently making a game, and I want my character to shoot projectiles at the enemy. I'm facing an issue where when I click, the bullet doesn't fire. Here's my code so far: public partial class PotatoCannon : Sprite2D { public Timer…
1
2 3
8 9