Hi everyone
My game has the following three scenes:
Title screen --> Menu --> Actual game
All three scenes work fine on the computer, but on my phone I can't go from the menu to the game. I have a back button to go from the menu to the title screen, and that works.
Here is the relevant section of code for the button. It's for checkboxes that the player must choose from before pressing the start button (if they choose nothing, they will get an error message).
if get_node("VBoxContainer/A").pressed or get_node("VBoxContainer/K").pressed or get_node("VBoxContainer/S").pressed\
or get_node("VBoxContainer/T").pressed or get_node("VBoxContainer/N").pressed or get_node("VBoxContainer/H").pressed\
or get_node("VBoxContainer/M").pressed or get_node("VBoxContainer/Y").pressed or get_node("VBoxContainer/R").pressed\
or get_node("VBoxContainer/WN").pressed or get_node("VBoxContainer/G").pressed or get_node("VBoxContainer/Z").pressed\
or get_node("VBoxContainer/D").pressed or get_node("VBoxContainer/B").pressed or get_node("VBoxContainer/P").pressed:
get_tree().change_scene("res://Level/Level.tscn")
else:
$ErrorLabel.text="Error!"
I am able to get the error message from the button, but it won't change scenes.
The only difference between the computer and Android that I can think of is that Android is supposed to run AdMob, but AdMob is called at the title screen (and the ads work).
I tried making a shortcut button to the game, and that didn't work either on Android
func _on_TouchScreenButton_pressed():
Global.selected+=Global.D
Global.selected_J+=Global.Dh
get_tree().change_scene("res://Level/Level.tscn")
Has anyone had a similar problem? If so, how did you fix it?
Thanks