gdscript Questions
8
Solved
I am studying the Godot Engine and GDScript and I searched on the internet about keyboard events, but I didn't understand. Is there something in Godot like: on_key_down("keycode")?
Known asked 4/9, 2017 at 22:37
2
Solved
After exporting my project to Android a directory named .godot/exported appeared in the root of my Godot project. It seems to contain some cache for the resources I have exported.
Problem is, autof...
2
Solved
I'm trying to make a digital clock in my game and need the current time (hours and minutes), formatted as so: HH:MM:SS How can I get the time necessary for this?
5
How do I create a timer in Godot which destroys the script's object after a given amount of time? I am looking to remove bullets from a game after a while to reduce lag.
1
Solved
I have a panel with a StyleBox applied in "theme overrides".
How do I programmatically change its background color?
2
Solved
Currently I am making a clone of the game Flappy Bird for practice. I am representing the bird as a RigidBody2D.
extends RigidBody2D
func _ready():
pass
func _input(event):
if Input.is_action_j...
2
Solved
I have a question about something I'm getting stuck on with a new 2D project. I added a sprite background and it shows no problem when I run the test. I setup the esc key as "key_exit" in the Input...
3
The "GlobalScope" class defines many fundamental enums like the Error enum.
I'm trying to produce meaningful logs when an error occurs. However printing a value of type Error only prints the integ...
1
Solved
The game is a head soccer game where the player has to try and score on the opponent. The enemy AI works by making the Vector position of the ball a global variable so that the enemy always has acc...
2
Solved
I am confused by part of the Godot Docs for the GDScript language. About midway down the page, in the "Referencing Functions" section, it says you can't store functions in variables, and then seems...
1
Solved
I'm trying to create a windy area within which the player would be pushed continuously to the left <-
So far this is what I've come up with for the WindyArea:
extends Area2D
var bodies_within=...
2
Solved
After testing out a few other engines I've settled into Godot for my game development learning process and have really appreciated the conciseness of GDScript, the node/inheritance structure, and t...
Mages asked 15/7, 2021 at 18:10
1
Solved
A continuation of the previous question
How exactly do we detect collision from body_set_force_integration_callback?
1
Solved
Is it possible to make a single node which collides like a RigidBody2D but at the same time when collision is disabled it works like an Area2D node and can detect overlapping?
for example:
I have a...
2
I would have used a kinematic body but i want to add real life physics to my 2d object but it seems that i can literally fly by pressing the up key several times
extends RigidBody2D
var velocity =...
Purgative asked 5/5, 2021 at 13:5
1
Solved
Using Godot 3.4, I have an enum setup as:
enum {
STRENGTH, DEXTERITY, CONSTITUTION, INTELLIGENCE, WISDOM, CHARISMA
}
And I would like to be able to make the string "STRENGTH" return the...
1
Solved
I created buttons (with extend Button). How do I use Stylebox to set the borders particularly?
extends Button
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
fu...
Thermosiphon asked 7/11, 2021 at 3:16
2
Solved
I'm trying to determine which Control node has just changed focus. Another Control node has been set up for using focus by changing the focus mode on the node to All. From within that node's script...
1
I'm currently developing a building system for my 2D top down game, and the last step is to check if there are any objects such as a tree or player obstructing the item from being placed. After doi...
Tongs asked 17/8, 2021 at 2:25
2
Solved
I have tried every google result that seems relevant and cannot find a solution to something I'm sure is simpler than I'm making it. There's a possibility all of the results are outdated, as the of...
1
Solved
What's the technical reason for this? It seems strange to me that they can't all just use position. Is it a legacy thing?
1
Solved
I've been looking for a robust method of pathfinding for a platformer based game I'm developing and A* looks like it's the best method available. I noticed there is a demo for the AStar implementat...
Decongestant asked 25/9, 2018 at 20:1
1
Solved
I have a simple network chat program created in Godot that I am using to teach basic encryption to high school students with. I would like to add a custom built encryption class to allow students t...
2
When I make a preload script in godot and put a variable in there, how do I call the variable in my other scripts?
Is there a special way to call the variable that I don't know or is there a better...
2
I have a basic code below. I am trying that the player not slide down on slopes. My slopes now are 45°. If the player stop movement on slope, it will slide down (maybe because velocity.y += delta *...
Nide asked 28/7, 2017 at 15:21
1 Next >
© 2022 - 2024 — McMap. All rights reserved.