godot Definition and 10 Threads

  1. D

    [Godot] Can I directly access files saved on Android to user:// ?

    Hi everyone My program saves files to user://. I'd like to find these files on my phone and copy them to another phone. Is it possible? I used ProjectSettings.globalize_path("user://") to show where the file saved and got /data/org.godotengine.[APP_NAME]/files/ However, when I went to...
  2. D

    Can globals in Godot randomly fail to update?

    Hi everyone I'm making a game for memorising pairs of things entered by the user (e.g. countries and their capitals). If we're using countries and capitals, I'll store countries as an array in Globals.arrayA. Capitals get stored as Globals.arrayB. The two arrays are stored in globals as...
  3. D

    How to open a JSON file in Godot that contains 2 arrays?

    Hi everyone I've saved two arrays into a JSON file. This was the code I used: func save(): var file = FileAccess.open("user://savedarrays.json", FileAccess.WRITE) var file_path = "user://saved_arrays.json" var data = { "arrayA": Global.arrayA, "arrayB"...
  4. D

    How do I connect a button pressed signal with code in Godot 4?

    Hi everyone I've downloaded a file explorer for Godot 4. It creates a button for every file in the open directory. When you press the button, it fills a prompt with the path to the file. This is the code for it: nBut.pressed.connect(open_folder.bind(file_name))func...
  5. D

    Will Godot miss lines if you try run too many things at once?

    Hi everyone I made a game for memorising Scrabble two-letter words. When you press a tile, it lights up and a button_on variable gets set to true. If the two tiles you press form a valid two-letter word, the tiles disappear (and get replaced with new tiles). I have 12 tiles running at any given...
  6. D

    Can anything block touchscreen buttons in Godot?

    Hi everyone I have a button that overlaps with a touchscreen button. I want to be able to press the button without also pressing the touchscreen button. I can't use the .hide() function on the touchscreen button because I don't want to disable the whole touchscreen button. Is there something...
  7. D

    Is there a quick way to put quotation marks around strings in an array?

    Hi everyone I'd like to cut and paste a list of words into an array. I'll need to put quotation marks around them all. Is there a way to do this other than to go through each word one by one? Thanks
  8. D

    How to change screen orientation in Godot with code?

    Hi everyone My app has two mini-games. One uses portrait orientation (which I've set in project settings). The other uses landscape. I need to use code to switch from portrait to landscape. This is what I've tried. func _ready()...
  9. D

    Why does my if-statement not work when I have (x-100) instead of x?

    Hi everyone I'm making a shoot 'em up in which enemies travel right to left towards the player. If they get behind the player, they are supposed to fire a shot at the player. The code below for the enemy works, but I'd like a slight delay before the shot is fired. func...
  10. D

    Can I stop space and enter from toggling my checkbutton? [Godot]

    Hi everyone I use space and enter as buttons for jump and shoot respectively. I have a checkbutton in my game for toggling the visibility of a display. It turns out space and enter also toggle my checkbutton. I didn't code for space and enter to do this. I can't find anywhere on the...
Back
Top