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

How to get Godot lighting to not affect node

In my Godot project I have two light sources. One will be a players flashlight which will be able to illuminate anything and the other light will be ambient light that will illuminate everything except for enemy players. I have the ambient light on…
1
vote
1 answer

Collision walls in Godot

I'm creating a game using Godot Engine and I can't figure out how to create a wall to prevent a player from walking out of the screen. The player is able to walk out of the screen window. How do I prevent it from happening? I tried to use the…
1
vote
1 answer

I switched from Godot 3, and i don't know what export(Resource) is in Godot 4

I switched from Godot 3 to Godot 4 and was trying to make a platforming game. I need the export(Resource) function, but it no longer exists/functions in the new Godot. What's the equivalent of the function, but in Godot 4? (language is GDScript)
100k7gm
  • 25
  • 4
1
vote
0 answers

Dynamic Navigation Polygon Generation in Godot 4.0

I'm currently developing a game in Godot 4.0, and I've come across a challenge I'm unable to solve. In my game, the level design is dynamic and involves placing walls and other terrain pieces at runtime. I would like to have the navigation mesh…
Eris
  • 21
  • 3
1
vote
1 answer

How can I get a bullet to seek targets?

I'm trying to make a rocket that seeks out targets and turns to them, but the rotation seems to not work. My code is as follows: var bullet_type = "Normal" var seeking var dead var speed func _process(delta): if not dead: position +=…
1
vote
1 answer

Godot 4.0 Platformer Movement Not Working

I'm new to coding and the game developing scene, so for my first project, I'm trying to make a Mario esc platformer in Godot. Using multiple YouTube tutorials as well as ChatGPT, I came up with code for the movement. However, I've run into an issue…
1
vote
0 answers

Problems when client connects(godot c#)

So, I try to experiment with godot(4.1) multiplayer and I am stuck for quite some time. The problem is that the server is connecting as expected, but when a client connects the player doesn't spawn (i have set the multiplayer spawner correctly) and…
1
vote
1 answer

How can I import stuff from local storage into a godot game which is exported as html5?

I don't know how to import and Export the localstorage data in a godot game. I use localstorage on my entire website and I thought it would be cool if people could trade the items of different games. I only would like to know how to import for…
User3455
  • 11
  • 1
1
vote
1 answer

Need to find out which button was pressed

The following scripts job is to scan the given directory and find out how many files(or characters) are in it. Then it creates a number of buttons equal to the total number of files. Currently my problem is that i have no way knowing which button is…
Stwest
  • 17
  • 4
1
vote
1 answer

(Godot) How can I stop the movement animation after my character stops moving?

Here is the code; func _input(event): if event.is_action_pressed("move_right"): $player_animator.play("walking_animation") if event.is_action_pressed("move_left"): $player_animator.play("walking_animation") if…
Birko
  • 11
  • 1
1
vote
1 answer

Godot 4 grid base item palcement

i want to make a open multiplayer rpg game with Godot 4. The problem is that, i have seen a video tutorial (here) and i came accross with this error: Invalid get index '2' (on base: 'Array'). here is my code extends Node2D @onready var camp_fire…
1
vote
1 answer

Godot for .NET Android Export

I am trying to learn to use Godot while at the same time using C# as the scripting language, I've followed along several tutorials and have been successful in converting the GDScript into C# in all of them so far, however, I've run into what may be…
Serj Sagan
  • 28,927
  • 17
  • 154
  • 183
1
vote
1 answer

Godot smooth 2d player movement script errors

I'm trying to program top-down player movement for my game, and im getting errors that are probably a really simple fix, but im new to godot, and need help. my code is: const SPEED = 200 const FRICTION = 5 const DASH_SPEED = 400 const DASH_DURATION…
1
vote
1 answer

Flip CharacterBody2D in Godot 4 in C#

The current system applies a scale transformation to the CharacterBody2D when the current horizontal velocity is more or less than 0 based off of the current pressed input keys. This should work in theory, and by all means it should work. I have…
Sprunk
  • 13
  • 4
1
vote
1 answer

How to set godot4 game screen resolution when launched

Because my fullscreen godot game would be avaliable on many platforms (e.g. mac, windows) so I have to make sure that everytime my game launches on it's first time, it checks the OS and device it's on and sets the correct resolution for the device.…
Coding_Guy
  • 160
  • 9
1
2
3
8 9