Relative Content

Tag Archive for godotgodot4

How do I make a 2D Sprite move in a random direction but not go offscreen

I’m trying to make one of those Cookie Clicker-esque games where the things you are supposed to be clicking randomly move away from you, and while I got the menus working, getting the actual stuff to work is not working. I managed to get Sprite click detection working but random movements or bouncing off the edge (or preventing it from going off-screen) won’t work. Heres my GDScript code:

Tilemap layer being removed after calling force_update

I am attempting to set_custom_data for every tile a building touches on my tilemap. when I call force_update(0) in my runtime update func, it removes the layer completely. I am simplying modulating the tiles for debug purposes, the goal is to create a dictionary of tiles with the has_building custom data

Godot Engine. Transferring data between scenes

The enemy should always follow the player, which means taking his positions, but since I have an enemy and the player I have these scenes, I can’t extract the player’s position as I did in the screenshot:

What is a VisibleOnScreenNotifier3D Alternative/Workarund Godot 4.2?

so, i just started learning godot , and i was following godot 3d tutorial from Godot docs “Squash the creeps”, it was going great until i encountered the warning sign on VisibleOnScreenNotifier3D node , it said “VisibleOnScreenNotifier3D nodes are not supported when using the GL Compatibility yet” and i tried to switch my compatibility but my device(intel hd 5500 , intel i3 5th gen, Hp notebook) does not support any other except the “Compatibility” version if i try any other it says “Your driver does not support vulkan” i updated the drivers but it didnt work.

Yahtzee Type Game: Looking for feedback/criticism

Just started using Godot and I am attempting to build a Yahtzee type game on my own. I created a function to evaluate the dice/roll and have it working correctly I believe. I was hoping to get some more experienced eyes to look over my solution and provided some helpful feedback/criticism.

How to have two Control nodes occupying the same space without only one being able to accept inputs

I have two Control nodes as children of another node sharing space on the screen, and within both I want to have ScrollContainers or similarly operating nodes the user can interact with. However, just changing the zindex does not do anything in that regard besides visually; the top one will always take the user input. I cannot just hide the other control node, though, because only some of the parts (like where the ScrollContainers are) actually overlap; it would be jarring if the user couldn’t see one Control’s children when utilizing the other. Is there a way to get around this, or do I just need to break up the Control nodes into multiple and try to synchronize them with signals?