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
-1
votes
2 answers

how to stop my character from jumping right whenever I just jump?

I'm working on a 2d side scrolling game and i ran into a problem when trying to implement the shooting into the player character, it used to be when shooting while jumping it does not shoot but now whenever I press the jump key the player jumps…
-1
votes
1 answer

Invalid operands 'bool' and 'float' in operator '<' when comparing floats in gdscript

I am using Godot 3.2.1 and I am making a turret scene, which rotates and shoots when it's pointing at a player. rotation is a property of Area2D and target_dir is the value of rotation which points at the player. I want the turret to shoot when…
Andrey Kachow
  • 936
  • 7
  • 22
-1
votes
1 answer

Making a one-click hyperlink software in godot

I want to make a multi-device software with godot that allows you to enter to a specific webpage that is recorded. I mean, you press a button, then a container appears, in the container you write the page and then, every time you touch the software…
user13901811
-1
votes
1 answer

question on wether a specific function exists in godot 3.2

i was wondering if there's a function in godot that allows we to see where in the screen or specifically in what cardinal direction based on the screen the cursor is in. i was wondering if such a function exists as i'm currently creating a 2d…
-1
votes
1 answer

how can i access functions from another scripts in godot?

I'm trying to make a top down shooter in Godot but I'm stuck ! I've made two scenes first bullet and second player. And we can change the rotation and direction of the bullet accordingly to the direction of the player. But I can't access the…
NJB's Codings
  • 17
  • 1
  • 9
-1
votes
1 answer

ERROR: "Invalid get index 'points' (on base 'null instance')" (Godot)

I was working on adding an upgrade-like system to my game, but was having some trouble with the get_tree().get_root().get_node() thing. In an attempt to retrieve a different node multiple layers up, I go the error ERROR: Attempt to call function…
CATboardBETA
  • 418
  • 6
  • 29
-1
votes
1 answer

Are there any prerequisites / precautions I need to take to make "loading" screen work in Godot?

I'm new to Godot and I'm working on my first project in that. The previous game was made on Adobe Flash using AS3. While I coded that, I didn't take the best methods to code the project (used a lot of frames and scripts on the frames instead of…
Mana
  • 352
  • 5
  • 22
-1
votes
1 answer

How can i detect opened programs in Godot3.1?

I want to detect, that is chrome opened, but I don't know, how to do that. This is in a program, that detects how much my little brother watches YT videos. Godot doesn't allow to get out of "user://"
-2
votes
1 answer

Why jump animation is not working in Godot 4?

I've made controller and it works but jump animation is not working. idk what to do with that. I made jump and walk anims not loop. Pls answer the qustion (Do not write about Vector 3) The problem is only in anims. func _input(event): if…
-2
votes
1 answer

Godot newbie puzzled by the hierarchy of nodes in regard to raycasting

I'm new to Godot, but not to OOP. I'm puzzled by something, which I guess goes to my lack of understanding of node hierarchies in general: If raytracing intersection looks for collision objects; how come, then, it yields a parent node of the…
rantash68
  • 47
  • 1
  • 6
-2
votes
1 answer

How do you make a ball bounce half the hight of the fall hight in godot

My original plan didn't work. pls help I had a while loop which updates the velocity(the more it falls the more the velocity is) of the ball when is not in floor and jump half the velocity of the fall velocity. But my project is stuck on the laoding…
Aaron
  • 1
-2
votes
1 answer

how do I get an enemy to follow me in a 2D platformer Godot

So I'm making a 2D platformer called "agent 404". I'm right now making the enemy but can't seem to make it. So I looked for a tutorial but couldn't find any tutorials related to a 2D platformer enemy that follows the player I tried all but most of…
-2
votes
1 answer

Can someone translate this Godot 2 code to Godot 3?

if is_colliding(): var normal = getcollisionnormal() var object = get_collider() var objectParent = object.get_parent() if normal == Vector2(0, 1): objectParent.queue_free()` I’m using move_and_slide to move if that helps.
1 2 3
55
56