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

How do I randomly spawn enemies(Kinematicbod) in Vector3

I am making my first 3d fps in Godot and I don't understand how to spawn enemies in a general area. If someone could show me a tutorial or something that would be great.
SolerG0d
  • 11
  • 1
0
votes
1 answer

Godot- Issue with flip_h after enemy collides with the wall (2D)

I am using Godot 3.2 for a 2D project, and running a script for an enemy to change the direction (flip_h) when is colliding with the walls, however, when the enemy collides with the wall or another enemy the enemy change also the direction. The code…
Jorge
  • 11
  • 2
0
votes
1 answer

godot - how to change sprite of a child node dynamically

Screenshot of 'Tao' node: I can't find a tutorial or a guide on how to change the sprite of a child node dynamically. I need to change the sprite of 'baba' which is a child of 'Tao. Here's my code and it's not working: var tao = Tao.instance() var…
glennmark
  • 524
  • 3
  • 13
0
votes
1 answer

Linear Interpolation for Smooth Transition - GDScript

I am trying to have a system that works its way around a 2D grid (a BlendSpace2D for animation) in a smooth fashion. x values can range from -1 to 1 and same for y values. I use the following code on a Vector2 to attempt to do this and it fails to…
0
votes
1 answer

Godot android export looks way different than in the IDE

I am making a game for android using Godot. I have a scene that is completly dark(no light sources and a dark worldenvironment), in the IDE and on windows export it's pitch black darkness(as it is supposed to be) but on android every model is lit up…
0
votes
1 answer

Godot Exporting for Universal Windows Platform is not clear (GDscript)

The description on the main site is not complete and clear! Please show me how to make a program for the Universal Windows Platform(UWP) with a clear and complete description step by…
bdshahab
  • 189
  • 1
  • 12
0
votes
1 answer

How can I make the player and enemies fall to the ground when they die?

I'm making my first game in Godot. No matter what I try, if the player/enemies die while in the air, they stay there. I want them to fall to the ground when they die. Help? While at it if you have any pointers based on what you can see from my…
0
votes
1 answer

Spread items evenly along the x axis

I am writing game code for blackjack to fan the players cards in their hand. This uses an array to tween the items by setting their vector2 position along the x axis. I am having issues with the math to evenly distribute the vectors on both sides of…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
0
votes
0 answers

How to do composite sprite on godot

I'm currently working on a 2 dimensional top down role playing game and i want to implement a equipment system wherein the way you look changes depending on the gear you have equipped and my idea is to do this by attaching the armor and weapons…
0
votes
1 answer

Godot magnus effect for pong clone

I'm in the making of a 2d pong clone in Godot. But I'm fairly new with Godot. Is there a way of implementing the Magnus effect? Like adding a fluid? or do I need to code that myself from the direction and angular velocity? I use the PhysicsBodys of…
bear14
  • 1
  • 1
0
votes
0 answers

How to have absolutely no bounce when colliding two objects?

I have a node called "SlidingBlock" which is a RigidBody2D, its mode is Character so I can move it with the physics engine but not rotate it. It also has a CollisionShape2D. I've programmed a kicking action on which I set a value for its linear…
Telmo Trooper
  • 4,993
  • 1
  • 30
  • 35
0
votes
1 answer

how to constantly update a variable with a touchscreen dragging input event position

My game require constant update of a var with a drag gesture postion as my finger is moving on the touch sreen please help as im pretty new to programming.
BTK JAY
  • 1
  • 1
0
votes
1 answer

How to find a node outside of the parent in get_node function?

Im using Godot Engine, i have encountered a problem. I want to acess a node outside of my parent i assigned the script to. I have assigned my script to player and i need to access ThirdPersonCamera. But i cant move ThirdPersonCamera into player…
Erik77
  • 109
  • 4
  • 12
0
votes
1 answer

How do I make a kinematic body (3d) follow a player

I've been making a FPS in Godot and I'm having a hard time getting the kinematic body (the enemy) to go towards the player. Could someone please help?
SolerG0d
  • 11
  • 1
0
votes
0 answers

Godot - Calling a scene instance to a particular position error

I tried to create a scene that resembles a bullet for a platformer shooter in Godot. I have created a scene with the root node being an Area2D, with a collision, and a visibility notifier. The code in that root node goes like this: extends…