Questions tagged [gdscript]

GDScript is a high-level, progressively typed programming language designed to work with the Godot Engine. It uses a syntax similar to Python (blocks are indent-based and many keywords are similar).

GDScript is a high-level, progressively typed programming language. It uses a syntax similar to (blocks are indent-based and many keywords are similar). Its goal is to be optimized for and tightly integrated with Godot Engine, allowing great flexibility for content creation and integration.

839 questions
0
votes
1 answer

Nonexisten function apply_impulse in base Node2D

Why when I run it to my app has been closed and write it - Nonexisten function apply_impulse in base Node2D. I see Godot's doc and I find it method and your parent is RigidBidy2D, but I do this code by the video and he use KinematicBody2D and it is…
0
votes
1 answer

Sprite node suddenly not found Godot

I added my player as a singleton and now Godot cannot find its sprite node. The game crashes when I try to move and gives me a "get_node: Node not found: Sprite." error. Does anyone know what to do?
Snowy Diamond
  • 29
  • 1
  • 2
0
votes
1 answer

Godot - get_node: Node not Found - GDScript

Please help! I keep getting this error message when I run my code for a title page for my game! I'm quite new to Godot. Here's the scene tree: Image TitleScreen - Control Node - ColorRect - ColorRect Node - Menu - VBoxContainer Node - Label -…
user14787186
0
votes
1 answer

Casting a scene to the type of the attached script or instancing with passing a parameter in Godot

onready var _boardView_scene = load("res://UrBoardView.tscn") gets the scene reference. Then I try to instance the scene like this _urBoardViewInstance = _boardView_scene.instance(). The UrBoardView scene has a script of type BoardView like this to…
Krinjon
  • 23
  • 6
0
votes
1 answer

Linear interpolation GDscript

I tried using the lerp() function to do linear interpolation in GODOT, however; the object in my project just abruptly stops, like it never slows down. extends KinematicBody var SPEED = 200 var direction = Vector3() func _ready(): pass func…
0
votes
1 answer

Godot 2D Top Down Tile Rendering in a Procedurally Generated World

I know this question gets asked a lot. But for the life of me I cannot find the answer on the internet. So far I have created a Scene with a Player node(camera attached) and a TileMap. The TileMap uses OpenSimplexNoise to generate a 32x32 grid of…
0
votes
2 answers

Instancing a gameobject when powerup is picked up godot

hello I'm making a super pong game that has a power up that adds another ball to the game. The next ball should appear in the center of the screen. extends Node2D var collect = false func _physics_process(delta): …
0
votes
0 answers

How can I find the player scenes x position in another scene?

I have a dedicated scene for my games character. I have another scene for "Level 1." I added a script to the root node of "Level 1." How can I use that script to both write the character node's x position to a variable, and then print something to…
AJN
  • 29
  • 1
  • 3
0
votes
1 answer

Godot save Items i have collected

I am working on a platformer game in Godot Engine where i have a Hub World that will house the entrances to all the individual levels, but i would like to save what items i have collected within the individuals levels so that once i finish the level…
zak_250
  • 9
  • 1
  • 1
0
votes
1 answer

How to return instance of class in its method in godot script

I have class v2 that contains a method Add. This method should return a new instance of v2 my code looks like this class_name v2 var x : float var y : float func _init(_x, _y): x = _x y = _y func Add(v : v2): return v2.new(x +…
0
votes
1 answer

what is the equivelant of get_global_pos from version 2.0 in 3.0?

I want to make a turret that is shooting lazers and i watched a tutorial on it. The person in the video used (scenename).position(get.node("Position2D").get_global_pos()) in order to spawn a projectile on the potition 2d. When i run this code, the…
TheCrazy
  • 1
  • 1
0
votes
1 answer

How to add Signals to objects created with add_child

I'm looking to create child objects that are duplicates of a pre-existing, using this method in my root class. While it successfully creates a copy of that object in the remote tree during runtime, it is not sending signals like the original object…
0
votes
1 answer

Change the variable if there is an int input

My objective is, if I type "points" it will show me the content of the variable but if I add an int after it, it will change the value of the variable This is what I have right now: func add_message(text): chatLog.bbcode_text += '\n' …
SynT
  • 1
0
votes
0 answers

Too Many Nodes Slows My Android Godot Game Down

My Game is a modern bubble shooter and i have like 100 bubbles. They all have script but script doesnt have process or physics process. But the game still has like 5 fps on a Samsung S8 Plus. The phone isnt that old. At least for a bubble shooter.…
Gandalf
  • 3
  • 2
0
votes
2 answers

How to load .gds file into Pandas?

I have a .gds file. How can I read that file with pandas and do some analysis? What is the best way to do that in Python? The file can be downloaded here.