XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Godot Forum - Topics tagged gdscript

Topics tagged gdscript

GOBLINS VS FISHFOLK - a co-op tower defense game (local multiplayer) I built back in 2024 without help of AI

I made this to learn godot 3D using 4.3… Still proud of the turtle surfing. Anyway, why not try the demo (big download, slow startup)? renevanderark.codeberg.page Goblins-vs-fishfolk Download for windows: https://renevanderark.codeberg.page/goblins-vs-fishfolk/goblins-vs-fishfolk.zip Try endless mode on your couch with real friends with multiple gamepads): Source code: Codeberg.org goblins-vs-fishfolk goblins-vs-fishfolk 5 posts - 2 participants Read full topic

Adding multiple similar children to the same scene

Godot Version Godot Engine 4.7.2 Question I’ll preface by saying I’m very new to Godot and this is my first game that isn’t following a tutorial. I’m essentially trying to make a FlappyBird clone. I’m trying to have the obstacles spawn in at a fixed interval using the pipe_shaft scene set up with a kill_zone similar to how Brackeys used it for enemies in his video ‘How to make a video game - Godot beginner Tutorial’ This is what I’m using to spawn the obstacles in the main scene: extends Node2D…

Loaded files are ignored in favor of current state

Godot Version v4.7.2.stable.official Question When saving files, everything seems to work correctly. When loading files, the loaded information seems to be ignored in favor of the current game state. For example: 1) data is incremented to 10, 2) data is saved, 3) data is incremented again to 20, 4) data is loaded and overwrites active game state, 5) data still shows 20, not 10. What could be causing this? “All” extends resource. It includes several sub-resources. This script simply saves the…

Grabbing Object while keeping Up Vector

Godot Version 4.7.2 Question I am making a simple grabbing system, using physics functions (applying impulse/force), and it’s going quite well, but I don’t know how to keep the grabbed object with its global.basis.y (or, even better, a custom up vector, since i’m gonna also implement a rotation around its origin) facing upwards (by applying torque). Here is the code i’m using #in the player script held_object.grab_point = raycast.global_position + ( - raycast.global_basis.z ) * holding_distance…

Godot Advanced Movement Template

GitLab Pasqui23 / GAMT · GitLab GitLab.com A project template for developing 3rd person games, featuring motion matching jumping hanging and shimmy around ledges extensible movement logic based on AnimationNodeStateMachine Remapable keys based on Smartinput addon Disclosure: I have used local LLM for writing some of the trickier code and the documentation 1 post - 1 participant Read full topic

Survivors Kit: a complete survivors-like template for Godot 4 (700 enemies in plain GDScript, web demo)

I’ve been building a survivors-like template for Godot 4 and it’s now out. You can play the demo in your browser first: Survivors Kit - Playable Demo by Spare Parts Studio How it handles the crowd Enemies aren’t nodes. They live in packed arrays, a spatial grid (rebuilt each frame with a counting sort) handles hit checks, and each enemy type is drawn with one MultiMeshInstance2D. The included performance test runs 700 enemies with six max-level weapons in about 3 ms per frame of game logic, in…

I need help for this code

it gives that error in item list 1. First Item Text: kılıç yüks (appears to be an abbreviation for sword upgrade/leveling) Icon: A file/folder icon assigned Selectable: On (checked) Disabled: Off (unchecked ) 2. Second Item Text: ekstra kal (appears to be an abbreviation for extra cal, extra caliber, or simila r) Icon: A file/folder icon assig ned Selectable: On (chec ked) Disabled: Off (unche cked) and here is code extends TileMapLayer # Called when the node enters the scene tree for the first…

Targeting an object in another scene

I have made a world scene that includes a model planetarium in which the model sun moves in synchronization with the DirectionalLight3D that is lighting the scene, using this simple script attached to the model sun: extends Node3D @export var target: Node3D func _process(delta): global_rotation=target.global_rotation This gives me a field in the Inspector that lets me assign a target for the model to synchronize its rotation value with. Now I want to make the whole model planetarium it’s own…

Not sure why the autotiles look like this

Godot Version 4.8.beta1 Question This is my first time working with autotiles. I’m trying to have a power cable come up as my mining drone moves around. It should be just one continuous line, but it’s coming out like this: I have a TileMapLayer node dedicated to just these cables. My autotiles are set up like this: I don’t understand why the corner is showing up, when based on what I have painted, the corner shouldn’t connect with the horizontal tile. My tileset is set up as the following: 3…

I don't know how to create UI appear when the mouse cursor hovers over an object.

Godot Version v4.7.2 Question I want to create a UI that appears when the mouse cursor hovers over an object. When the cursor hovers over a ColorRect, I want a PanelContainer to appear, allowing the user to click the button inside it. However, the PanelContainer doesn’t appear with my current setup. I’m a godot & English biginner. extends ColorRect @export var text: String @onready var button: Button = $PanelContainer/MarginContainer/Button @onready var area_2d: Area2D = $"../Control/Area2D"…

Both functions are being called even though it should only be one

Godot Version 4.7 Question I have code to throw ravens, and currently I have two ravens to summon already placed in below my map. When you call the throw function, it moves one of the ravens over to the RavenSpawnPoint and then it starts moving. Which one it throws should be decided by the CurrentRavens integer. The problem is, when CurrentRavens == 2 it throws both of them rather than just one, then when I press it again it only fires Raven1 as it should, but that means it isn’t running the…

Can i edit an AnimationBlendTree resource without an AnimationTree node?

Godot Version 4.7 Question If i click on an AnimationTree node that has an AnimationNodeBlentTree resource as root, the animation tree editor shows up on the lower dock: If i select an equivalent AnimationNodeBlendTree resource on a custom node, the editor does not show up: I want to stash away many “template” blend trees that will be procedurally added, removed and rewired on a final AnimationTree node. I could just have one child tree per custom node and edit the template blend trees there,…

Need help with working on a pause screen

Godot Version 4.7.2 Question I’m working on a pause screen for my game, and have managed to get it to toggle on and off with the escape key. However, the tutorial I followed did not include instructions on how to use the mouse, and since the pause screen is a canvas overlay, I have concluded that the player’s camera code is causing the mouse to be stuck in the middle of the screen. The code for said camera is in a script attached to my player, but I don’t know how I could stop the mouse from…

Generating buttons with gdscript

Godot Version v4.7.2.stable.official Question I’m trying to write a function that generates a list of buttons for each character in the party. The function to generate a button looks like this: func vboxAppendButton( character:Character ): if vbox == null: return false var newButton = Button.new() newButton.text = character.identity.familyName newButton.connect( "pressed", _selectButtonPressed ) vbox.add_child( newButton ) func _selectButtonPressed( ): print( "pressed" ) The buttons are…

RATS!! – a co-op tower defense where thousands of rats come for your grain

In August, this game was grey lanes, orange dots and a yellow square for a barn. This thread is where I’ll show how it turned into RATS!!, and what I learn along the way. What it is: a co-op tower defense for 1–4 players. You’re not a cursor, you’re a farmhand: you run out, build where you stand, and chase down the rats that grab your grain and try to carry it home. Four worlds (a granary, the docks, the sewers and a winter farm), a crowned rat boss in each, and a 1v1 mode called RAT WARS where…

Trying to set a destination level for a door through code

Godot Version 4.7.2 Question Hi everyone, I tried to find an answer by searching the forums but came up empty. It’s my first post as well so apologies for any mistakes. I am making a sci-fi rpg where the player’s ship travels to different planets/locations. I’m trying to make it so that the airlock of the ship (which is the ShipLevelTransition) changes the target level based on what planet the player selects from a map ui in another scene. This is my map UI where that planet_scene is set:…

How to get all control nodes under the mouse?

Godot Version 4.7.2 Question Hellou, I am trying to make a simple drag and drop system with control nodes and I was wondering if one can get all the control nodes under the mouse position. I know there is the gui_get_hovered_control() but that only gets the top one, or the one hovered rather and that doesn’t really work in my case because I am dragging a control node all over so the dragged control node always gets the hover and so far I didn’t find a way to disable the dragged control to not…

[Resources] Massive 2D Asset Bundle for Game Jams + A Spooky HTML5 Minigame!

Hey Godot Community! ​I’m a solo student indie dev. I know how crucial good 2D art is when prototyping in Godot, especially if you are participating in any October Game Jams. ​To help out the community (and to help fund my college tuition this month), I’ve put my entire premium 2D asset catalog on a massive 50% OFF sale for just $2.50. All the 2D sprites are engine-agnostic and ready to be dropped into your Godot projects! ​ What’s in the $2.50 Bundle: ​ Complete 2D Soccer Kit: 12 Stadiums, 13…

Trouble implementing $LineEdit.grab_focus()

Godot Version 4.4 Question I am trying to use grab_focus() on my LineEdit node to prevent WASD keys from controlling movement elsewhere in my project when the player is typing in the LineEdit. I have looked it up in the Docs and found the following information under grab_focus(): “Has no effect for LineEdit and TextEdit when ProjectSettings.gui/common/show_focus_state_on_pointer_event is set to Text Input Controls, or for any control when it is set to Always.” However, when I navigate to…

Hexagonal Tilemap in Godot

I’ve got a question about hexagonal tilemaps I’m know how the normal Tilemaps work, I’ve even made a few game engines myself using Tilemaps. and they are really simple to use and understand. however, if I were to build it from scratch, how would a hexagonal Tilemap work, in Godot. I’m just curious. 3 posts - 2 participants Read full topic

3D test dummy keeps disobeying simple go here command automatically

Godot version4.0 Question On my 3D test bed for a game I encountered a path finding error, I tried to have my test dummy go up a ramp (he almost made it and when I refined the code he seemed to dtop halfway up (which was less) so I put the target on a flat surface on the high point and moved the target to a couple of meters ahead to find out what went wrong. That failed as he kept missing the target after altering the code he had a quirk of just going the opposite way running of the maps edge…

What approach for "smooth" 2D terrain that can be dug into / subtracted from

Godot Version 4.7 Question Context I have a bit of GDScript knowledge, using the free “Learn GDScript From Zero” course. It’s my first real knowledge in code-based programming, after previously having made simple games using visual programming tools like Scratch/Turbowarp. It was nice to gain fundamental knowledge in programming concepts that was still missing when I was using Turbowarp. In terms of in-editor experience, I have followed the Dodge The Creeps example from the documentation, and I…

Things that exit 0 in Godot 4 headless even though they failed (measured, reproducible)

If you run Godot headless in CI, or let an AI agent “verify” a change, it usually runs the engine, sees exit code 0, and calls it a pass. In Godot 4 that proves very little. I measured these on 4.7.2, Windows and Linux. Every one exits 0: --import on a project with a hard syntax error: no output at all a scene whose own script doesn’t parse: SCRIPT ERROR, then the scene runs as a bare node a test harness that forgot to await a slow check: prints PASS, and the failing check never prints running…

Barn Rush: a farm-animal time-attack roguelite, demo on Steam

Hi all! Barn Rush is my first game, made in Godot 4.7 with GDScript. You’re a farm animal with 15 seconds a round: grab food, haul a wobbly stack back to the barn, and bank it before the buzzer. Between rounds you draft upgrade cards, and every five rounds you need to hit a Harvest Goal to keep the run going. 50 rounds in the demo but further available in the full game! A couple of Godot notes: the simulation is fixed-step with seeded runs, so the game logic stays deterministic. On macOS, a…

Simple Enemy Wave System with an Array

Godot Version 4.4 Question Okay so basically I want a simple enemy wave system that spawns enemies in a list that I can manually change. I have pretty much all of the code set up, however, I don’t know how to use an array to help me; I want the code to be able to read one item in the array, change a variable based on the item, then go to the next item down the list. For example: An enemy wave array would look like this: array = [1,2,3] I want the code to read the first item, and when it sees…

Oblivion: Xero | LITE - come play test (and break) my game!

I finally finished a much bigger project I’ve been working on non-stop since March, finally I’m done..! This is a top-down action “RPG” card game. The mechanics are aimed to be very simple without too many complex system - cuz i just dont got time for that lol itch.io Oblivion: Xero | LITE by Lushu b4 infinity 13 posts - 5 participants Read full topic

PixelForge — Offline Sprite Sheet Maker for Godot / Unity / Phaser

Hey everyone I built PixelForge, an offline browser-based sprite sheet maker and pixel art studio. It helps you turn individual images or GIFs into engine-ready sprite sheets. You can import frames, pixelate them, pack them, preview animations, and export them for Godot, Unity, Phaser, GameMaker, Construct, Aseprite, or CSS. What it does: Import images or GIF frames Pixelate and prepare sprites Pack frames into a sprite sheet Preview animations Export Godot-friendly JSON, Phaser JSON, Aseprite…

Timer starts when you open the game

Godot Version 4.7 Question So when you start a level its timed and when you finish it shows how long you took to finish it but it starts timing when you open the game not when you start the level. Also when you finish the level it keep timing it so if you restart or go to another level the time will be continue EX: in the main menu for 2 seconds so when you start a level it starts at 2 seconds instead of 0. You Finish a level in 18 seconds and go to a next one the time will continue and start…