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...
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...
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"...
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...
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...
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...
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
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()...
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...
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...