Questions tagged [gdscript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

How to get an autotile in Godot 3.1?

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.
0
votes
0answers
37 views

Simple message box in gdscript / godot

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 ...
1
vote
2answers
39 views

How can I get the NodePath that points to the property, rotation, of the parent node?

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: <...
0
votes
1answer
41 views

Get project's gravity value in Godot

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 ...
0
votes
2answers
153 views

How to use Animation Player in Godot like Animated Sprite

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 ...
0
votes
1answer
70 views

Godot Animation only playing First Frame

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....
0
votes
0answers
33 views

In godot, how could I make an explosion not destroy occluded terrain?

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 ...
-1
votes
1answer
962 views

How do I fix this “identifier is not declared in the current scope” error?

I got this identifier inputevenmousebutton is not declared in the current scope; should I use another identifier? ...
0
votes
1answer
304 views

Fixing error(23, 2) Error parsing expression, misplaced: func

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 ...
0
votes
2answers
55 views

Add force to objects while inside area

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