G
Godot Version 4.7.2 Question Hello i was wondering how do I detect if bool is just been deactivated like how Input.is_just_release_action() work. I’m doing a composite style of coding since I saw a video about composite coding and the advantages you can benefit from this. This code is from my Movement component: func _update_movement(delta : float): #Movement / Directions if direction: body.velocity.x = direction.x * speed else: body.velocity.x = move_toward(body.velocity.x, 0, speed) #Jump…
G
Godot Version Godot 4.8 rc1 Question Hi ! I would like to implement a “Reset island” action, similar to the one found in A Monster’s Expedition. Here is a clip to show what I mean : I know that there is a UndoRedo class in Godot, but I do not know if it can be used for such an action. Can you give me some hints please ? 4 posts - 3 participants Read full topic
G
Godot Version Replace this line with your Godot version Question Why isn’t this working and can someone please explain it to me in a detailed manner im trying to learn coding through trial and error i just need to get some more experience. func _on_area_2d_mouse_entered() -> void: if _on_area_2d_mouse_entered(): $"Upgrades/+ 1 CashMulti/Price".visible = true else: $"Upgrades/+ 1 CashMulti/Price".visible = false " I might be back because after that i’m going to try to make the text sort off…
G
I always felt like there should be ton of tutorials for godot programming, especially begineer ones that teach you how to write code, i saw this in unity, roblox, unreal but in godot i only can say maybe devworm At the end i learned most of gdscript from docs and from specific feature tutorial, but i still feel godot should at least have more youtube based tutorials, what do you think? and do you think it’s worth trying to maybe make such tutorial series? 16 posts - 11 participants Read full…
G
Godot Version godot 4 Question hey, y’all This feels like a very nooby question but I have looked at this every way I can think of and cannot understand why this is happening. I have a label called “state_label” that I am trying to access from a script in order to set its text to say the current state. this is the line that causes the problem: state_label.text = “idle” should be pretty simple. my first attempt, I used an onready var for state_label that I am certain had the correct path. it…
G
Hi! I come from C++, so I’m quite used to strong-typing and actually prefer it. That’s why when I want to store some data e.g. about an attack (Damage, Speed, ElementalType etc.), first thing coming to mind is a STRUCT. I know they do not exist in GDscript, so I’m trying to understand the pros and cons of using Classes vs Dictionaries for that. DICTIONARIES provide most things I could want (no memory manegment, can be easily serialized) but come with the drawback of not enforcing typing/layout:…
G
Godot Version 4.7.2 Question Hello. I’m new to godot and just learning. I’m making a 3D game where the menus and ui will play a big role. I want to know where they’re placed in relation to the 3D world as I’m editing it I have my pause menu in a scene, and that’s been placed in my main scene. It’s root node is a canvas layer, which google told me would make the ui visible to the camera. It does, but only when I’m running the game. While I’m editing the game, I have to swap the scene to '2d"…
G
Godot Version 4.7 Question I have a player character on collision layer 2 and mask on layer 1 and an npc set up with collision on 1 and mask on 2. On my script for my interaction node(area 2D, child of npc), I’m running a script to check if the collisions are overlapping: func _on_body_entered(body) -> void: print("register") but nothing happens when the objects overlap. I ran a print command at runtime as well and confirmed that both characters had the correct collision layers set. I want to…
G
so. after approx 4 months of me trying to figure out Godot, I finally have my first game ready (other than the game I made following a beginner tutorial.) I really don’t know what to say here, so here is the link to it Space Drifters by Nate42 . I am looking for constructive criticism for anything here. (the Godot project is available to download) for clarification, this is my first game period, other than games made in scratch. I did not use AI to make this game, unless you count google…
G
Godot Version 4.5.1.stable Question I have a 3d game, but I want certain actions to bring the game into a 2d text based dialogue thing. Think Sunless Skies/Seas. What node would I use to go about this? 3 posts - 3 participants Read full topic
G
Godot Version 4.6.1 Question I’m making a FPS gun where the amount of ammo in the mag is displayed physically. Instead of a HUD, the bullets are shown as 3D models that appear/disappear with how much ammo is left. I have modeled this, but I am unsure how to code what I want in. I think arrays are used for this, but I’ve looked at the documentation and honestly I’m not sure, can’t seem to figure out how to use them anyway. So I’m asking here This is my current code, obviously inefficient but…
G
Godot Version v4.7.2.stable.official Question I’m building an RTS game where the player can travel between small maps. Apparently I don’t know how to build a new navigation polygon when loading a new map. “mapRoot” is a node to which the various maps can be attached. These maps contain TileMapLayers where some tiles have collision. I successfully rigged up a system by which the player is transferred to the correct point on a new map. However, the NavigationRegion2D needs to be updated with a…
G
Godot Version 4.7.2 Stable Question Would it be a bad idea to have something like: class_name BaseItem extends Resource func get_item_data() -> ItemData: # override this return null class_name Item extends BaseItem @export var item_data: ItemData func get_item_data() -> ItemData: return item_data class_name Weapon extends BaseItem @export var item_data: WeaponData func get_item_data() -> ItemData: return item_data Where WeaponData would extend ItemData It’s more boilerplate but it would make it…
G
Godot Version 4.6 Question Hi. I made a Desktop Pet recently on Godot utilizing DisplayServer.window_set_position(Vector2i). I’m moving a transparent window the size of my sprite across the taskbar to simulate walking/moving/etc. This works great in my editor, and when I exported it to Windows and ran it on my laptop, it worked. I sent it to my friend for testing and on their computer the window refuses to move as well the gravity seems to be faster. I really appreciate the help! My code for…
G
Godot Version 4.7.2 Question tl:dr - Im using a String comprised of various variable values in my class instances to see if they are similar enough to stack in an inventory. Is there a better way or is this okay? I’ve made an inventory system for my game which uses Item instances for items. This allows for multiple instances of the same item with different values for things like condition. My inventory is a list style, so when the player collects multiples of the same item I want them to be…
G
Ik ik, AI topics are terrible and all of that but today i come with some data for people who wonder about LLMs - i used QWEN3:14B and 2 helper files giving it syntax rules My goal was to make simple script where i won’t use much godot-specific stuff to see if coding is good for qwen model, it will move node2D if sum of array’s 1 values is greater than array’s 2 This is the first version of code it gave extends Node2D var array1: Variant; var array2: Variant; func _ready(): array1 = [1, 2, 3];…
G
Godot Version 4.7.2 Question Hi everyone, I’m currently trying to make a game inspired by Gun Sprint where shooting a gun uses physical recoil to make the weapon flip, fly, and jump across the level. Right now, it feels like something is missing with the physics behavior, and it doesn’t quite match that snappy, addictive game feel. I am using a RigidBody3D for the weapon player object with custom scripting for the recoil math. Here is my current setup from the inspector: Script Variables…
G
Godot Version 4.8 Question Hiyya! For non-pixelart 2d games, such as hand drawn textures or lineart based games… what is the route to take? Is there somewhere a tutorial to follow? The textures seem to somehow blur out at times. Switching around the options in Projects Settings seem to improve things, yet the blurriness appears and there’s strange interlacing or more like “weird resizing effect” happening when the character stops. How does one go about it? How do we make smooth and crisp art…
G
Godot Version 4.7.2 stable Question I am trying to store the location of a movable platform in my 2d game. When the platform falls down I try to store its location in the global game state. The variable “yyy” is computed from a ray collision when the platform hits the static scene and I use the collision location to set the platform at the correct location (correcting for moving a bit too fast or slow) as follows: global_position.y = yyy If I print both “yyy” and the “global_position.y”…
G
Godot Version 4.7.2 Question I made this script that gets all of the used tiles in a tilemaplayer, assigns them each data with the key as their coordinates on the tilemaplayer, but whenever tryharvest is called it changes the harvestable property for all cells, not just the one at the coordinate, how would I fix this? All of the parameters given in tryharvest from where its called is good and when spawnitem is called it spawns at the correct place, anything thats set to null is a placeholder…
G
Godot Version: 4.7.2 Question: I followed a tutorial to make a box the player can push. (It was 2D, but I followed it anyway because there are 3D versions of each object) It almost works perfectly, but the box no clips through the floor when stood on, even though I used the fix the tutorial showed. I tried changing the ground from a plane to a cube, and instead of no clipping, it just rotates and moves out of the way. I would like the box to not move while im standing on it, but not just…
G
My first post about Peg Roguelite Kit was about the fixed step physics, which is what lets the aim guide show exactly where the ball will go. This one is about the trinkets (the run’s upgrades) and one problem that comes with having an honest aim guide Every trinket is a resource file. You pick when it’s checked, when it applies and what it does, and most of them are nothing more than that. Hot Streak is “on every 10th peg hit, x1.5 Mult”. Tally Stick is “+1 Mult for every 5 pegs hit”. 34 of…
G
I made a cheat sheet that just runs through some important gdscript code that most beginners will encounter and likely go “what is this” heavily inspired by the PICO-8 Cheat Sheet by Liquidream, credits in the actual image itself (and a link to the inspiration here) Can also be useful for some experienced godot users aswell!! i hope it is of use to people (google drive link too bc im unsure if godot forums compresses image files, here) 3 posts - 3 participants Read full topic
G
Godot Version 4.7.2 Question I’m trying to learn how to perform basic functions in the Godot 2D space, and I have followed a guide online on firing a projectile. The problem I have is that the projectile will move side to side with the player moving side to side, rather than just moving up the Y axis at the X position it spawned at. I’ve tried a few guides online, such as putting owner. before add_child. I tried to see if there is a signal to export the function to main scene, or if I can just…
G
Godot Version 4.7.2 Question I have an issue while trying to make a simple popup system. The goal is to close the popup if anywhere on the screen is clicked besides the visual popup itself. I tried doing that my making the parent control take up the whole space and set it to Mouse → Filter → Pass and the visual container itself to stop the mouse inputs. And I have a little script in the root of this scene that connects to the gui_input signal to try and catch that input outside of the visual…
G
Hi, I’m now about to start having live play tests for the game to test out multiplayer and the game, so I’m looking for volunteers to join and test the game! And also at the release of the game when I release it on steam, a random 10 people will be picked and given a free copy of the game for play testing! Join the GC to get a chance to play-test or bug-test the game! you will get a ping if the play-tests are live! The link is Steam Community :: Chat Invitation ! 1 post - 1 participant Read…
G
Godot Version 4.7.2 Stable Question I am spawning Pickup instances when the player selects the item in an inventory. The Pickup instance is a RigidBody3D which has a child scene representing the object visually, and a CollisionShape3D which has a shape assigned when its spawned. The player will be able to drop multiple items at once. I am currently just spawning the pickups in a random circle around the player. I think some of the collision shapes are intersecting each other or the player when…
G
Godot Version Godot v4.7.2 Question I’ve been trying to make a game, but when I try to run it on the editor, it appears this: This is my line of code: I tried to add a suitable ‘idle_right’ animation and put the animatedsprite2d back to the box to try again, but the issue persists. I’d appreciate the help greatly. 2 posts - 2 participants Read full topic
G
Godot Version Godot 4 Question I have been trying as hard as I can to make a simple platformer for hours. I don’t know what’s wrong. I just started using Godot, and I’ve been using tools like YouTube and ChatGPT to help me. But every time I run this code or anything like it, I get an error, such as *_*physics_process: Invalid operands ‘Nil’ and ‘float’ in operator ‘*’. Or the player just floats in space and none of the controls do anything. I have no clue what I’m doing, but I think I have a…
G
Godot Version 4.7 Hi all. Sorry a noob here I am starting to design a game which is quite UI heavy. After some research it seems the best way to approach this is to create separate scenes for each UI. In starting out I have just 3 UI scenes: MainMenuUI LocationUI ShopUI My main scene is named ‘GAME’ and I have added a child node to this called ‘UI’. Then I have instatiated each of my UI scenes underneath. So, my ‘GAME’ node2D tree looks like this: GAME -UI MainMenuUI ShopUI LocationUI How do I…