Guys, i am really in touble here.
After effort i succeeded to make a save system for my game.I store in a global variable called "bestscore" my best score. I have two scenes. One main scene called MENU with two buttons: one New Game button and one Load game button.The second scene called World and is the biggest part of my game.When i run the project we can see the MENU scene with the two buttons.When someone presses the New Game button then the game starts normally (World scene).I send a signal from New Game Node to MENU Node and in MENU script i have this:
Heading
func onNG_pressed():
var fortosi=load("res://World.tscn")
var ins=fortosi.instance()
add_child(ins)
visible= not visible
pass
#
When the game starts we can see on the top and a score=0 (Label-child of the World scene).When i collect objects the score counts normally and the save system stores a best score.All right here.
Now,this is the problem.I want when someone presses the Load Game button then on the score (Label) to shows the bestscore.I wrote this in the Label script :
Heading
func ready():
settext(str(singleton.bestscore))
pass
#
but with that way the bestscore is on Label independently if i press the New Game button or the Load Game button.Then, i created a Load Game button as a different scene , i merged it in World scene and i saved it as a scene in MENU scene.I sent a signal from Load Game node to Label node but obviously it was a solution to despair.Τhe Load Game button was on over the World scene and when i runned the project and i pressed the Load Game button obviously did nothing because it belonged to World scene.
Basically , i can start the game when i press the Load game button but the point is how the bestscore can may appear on the Label and starts the game from this score(bestscore). i realized that it is a very compicated situation...
Thank you in advance guys for any suggestion and i am sorry about my english.