Skip to main content

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).

Filter by
Sorted by
Tagged with
0 votes
1 answer
476 views

I'm working on a tank game where bullets are reflected off of walls. The formula for a reflection is: $$ r=d−2d⋅n∥n∥2n $$ where \$d\$ is the incoming vector and \$n\$ is the normal of a wall. My ...
dylan's user avatar
  • 135
1 vote
1 answer
112 views

I was trying to implement a simple mechanic by drawing a line between the sprite and the mouse, but it's not working that well: ...
SHikha Mittal's user avatar
1 vote
1 answer
3k views

Previously my items were relative to the player by node hierarchy. But for items like bombs this is not ideal so i tried to add the items to the world scene, but when i try to adjust the position of ...
dylan's user avatar
  • 135
1 vote
1 answer
3k views

Im using raycast to detect if a block is to my side. I can use raycast to see if i need to climb stairs but the transition is bad. I immediately reach the top of the stairs when trying to go on them....
dylan's user avatar
  • 135
2 votes
1 answer
174 views

I'm using Vector2.distance_to to get the distance between a MeshInstance and a KinematicBody but the results aren't as expected. I'm using ...
Mr.Smithyyy's user avatar
0 votes
1 answer
2k views

this is the whole code ...
zenux's user avatar
  • 1
2 votes
0 answers
775 views

When I try to use the new feature of godot that lets you import sprites as an atlasTexture, I dont' get any results.
Hamza Memon's user avatar
0 votes
0 answers
1k views

I am new to game development and have been practicing programming games in godot. I am looking to make a minimalist game that uses simple ascii art however I am unsure if I should use UI elements to ...
Blue Winters's user avatar
0 votes
1 answer
829 views

How we can get the button reference on the event function that is connected? My connect signals never works ...
Sam Toorchi's user avatar
3 votes
1 answer
2k views

Here's a rudimentary custom resource: extends Resource export(Resource) var scr I can drag a pre-made .gd script into this exported property in Inspector, and ...
user2649762's user avatar
1 vote
0 answers
92 views

I wonder if there's a way to get an autotile just like a single tile using a get_autotile() GDScript function or something like that.
EmmanCanVaz_95's user avatar
6 votes
1 answer
9k views

I want a single line of code which shows a popup dialog with the words "Hello World!" and an "Ok" button. (I want something simple for now, I know how to make something more complicated but that ...
Strategy Thinker's user avatar
1 vote
2 answers
958 views

The 2nd arg in interpolate_property takes a NodePath, but str of a path to a prop seems fine too. So I'd expect this to work: <...
James T.'s user avatar
  • 113
0 votes
2 answers
3k views

I need to get access project's gravity value which set in Project Settings -> Physics -> 3D -> Gravity, however I couldn't find any related information about this. How do I get project's gravity ...
modernator's user avatar
  • 1,223
3 votes
2 answers
4k views

So currently I am using the following code to play my sprites (AnimatedSprite Node). $Sprite.play("Animation Name") However now I want to use the AnimationPlayer ...
Johnston Liu's user avatar
0 votes
1 answer
2k views

I have tried checking if it is already playing, stopping animations before and putting it in a separate function. Whenever I jump it should play 4 Frames of my animated sprite. But it only plays first....
Johnston Liu's user avatar
0 votes
0 answers
106 views

This game is in 2D, and is made out of blocks. Normally, I would simply erase blocks that aren't indestructible and are within range of the explosion. However, if blocks are behind something ...
Rami's user avatar
  • 1
0 votes
1 answer
16k views

I got this identifier inputevenmousebutton is not declared in the current scope; should I use another identifier? ...
Najma Muhammad's user avatar
0 votes
1 answer
4k views

When I try to use the GDScript code below, Godot gives me the error: error(23, 2) Error parsing expression, misplaced: func Why am I getting this error, and how can I fix it? Is there another input ...
Najma Muhammad's user avatar
0 votes
2 answers
611 views

I'm currently trying to create an area that would somehow push objects to a specific direction. (and also apply angular drag if possible) I'm currently new to Unity and Godot. I have already seen ...
Jerry Joe Desamito's user avatar

1 2 3
4
5
9