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
0
votes
0 answers

Godot editor freezing at 66% trying to install into Android device

I am trying to run a mobile game in a Android phone. It is recognized by the Godot editor and I once was able to deploy the app into the phone successfully. However, I now get always stuck at 66% of the loading process trying to install the game. I…
0
votes
1 answer

Invalid Operants 'float' and 'Vector2' in operator '+'

I am trying to make left and right movements for mobile, I have made 2 TouchScreenButtons and a CanvasLayer for them. Here is my script: extends Sprite2D const speed : int = 5 # Called when the node enters the scene tree for the first time. func…
0
votes
1 answer

Arrow not pointing correctly

My arrow(rigidbody2d) doesn't point correctly. So i tried velocity.arngle() to rotate my arrow but didn't work. (Rigidbody2d) And i also tried offsetting the center of mass but didn't do a thing till it contacted something
Aaron
  • 1
0
votes
0 answers

Problem with the collision of the player with the ball in the game Pong

When the ball collides with the apex of the player's rectangle, the player begins to move along with the ball I found no method to detect whether the collision was at the apex of the rectangle Script Ball var posicaoInit var velocity const SPEED=…
0
votes
1 answer

in gdscript how do you get the toggled function to do something when a checkbox is clicked in the godot engine

in gdscript (using godot 4.1.1 stable) i am working on a function that adds a checkbox dynamically works fine but when i try to get it to do something when it is toggled i get all sorts of errors this is my small function func…
Mike
  • 69
  • 1
  • 3
  • 9
0
votes
1 answer

How to wait for tweens in Godot 4

Previously, in Godot 3.1 I had something like this to wait for a Tween animation to finish: await current_screen.tween.tween_completed Where the tween was a node of the current_screen. Now, as I understand it, we are supposed to create the tween…
0
votes
1 answer

Godot, can't make functioning buttons in a class constructor

I'm trying to make a button within a class constructor in Godot 4. Making them outside works like normal, but when I do it inside a class constructor, pressing them does not run the function connected to them. Example code for the class: class…
0
votes
0 answers

Node unexpectedly deletes all children nodes without having any code to do that

I build an app to manage recipes and a shopping list, and made a menue to look at and change the shopping list. When I load in the shopping list into the menue the first time it works without a problem, but when I change an amount or add something…
0
votes
1 answer

How to Play a Godot 4 HTML Project Locally?

I have exported the web version of my Godot 4, it is in a folder on my local drive. Because of the SharedArrayBuffer dependency I can not just double-click in the index.html file. If I do so I see this error: Error The following features required…
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
1 answer

Godot 4 point and move system offset even though all sprites are 0,0

I'm a rookie making my first 2d game in Godot, which I'm drafting from a much smaller JS,CSS, & HTML version called Storie. I am attempting to create a Point-click-and move function into my game. All was well in my main sprites scene, but when I…
0
votes
1 answer

What is the best way to handle an enemy that collides but on different layer than player in Godot?

I'm trying to create a platform runner game. I have an enemy that runs towards the player and self destroy when off screen. Since the enemy is running on floor, I have a CharacterBody2D . I don't want the enemy to push player, so I had enemy to be…
user1865027
  • 3,505
  • 6
  • 33
  • 71
0
votes
1 answer

How to combine 2 scripts into one in godot

Iam making a simple game in godot and I have 2 scripts for my plaer: movement and shooting. I would like to combine them somehow but IDK how. Also Im new to godot so I would appreciate if someone explained it to me with simple temrs. Thanks!!! I…
0
votes
2 answers

Connecting from GDScript class to Node won't run function

So I have a game I'm making and I'm making a dash mechanic. I have a player class that the player nodes (that are character2D nodes) inherit from. I (mostly) made it so the player needs to have a dash bar filled up so they can dash. I need to have a…
MyBoi
  • 1
  • 3
0
votes
0 answers

Why Can Only The Godot Icon Glow When Using World Environment?

I used World Environment to glow up specified things. But if I set the World Environment's Environment's Glow's strength to 1, and just change the Self Modulate. The objects can't glow except the Godot Icon. The scene is totally empty with no…
SEU
  • 3
  • 2
0
votes
2 answers

Sprite3D texture turns to when I change it thru code in Godot 4.1.1

I'm making a 2.5D tower defense game with bloons in Godot. (All code and scenes are on my github). (Also I fixed my git so the repo is working now) My Bloon scene consists of a Node3D and a Sprite3D for the Bloon, and when I instantiate the Bloon…
1 2 3
8 9