Let me start by saying that I have had no prior experience in programming, so I'm coming at this blind. So, right now I'm following a tutorial, where they showed how to make a button change the text of a label, and then how to make a clock with a label and the node.set_process() function. So (naturally) I wanted to make a clock that started counting, but that reset after pressing a button. After some failed tries I lowered my goal to making a label that first shows some text, and after pressing a button shows the time passed since starting the scene. Here is what I came up with, but when I press the button, nothing happens, can someone please help me understand this a little better and maybe even show me how to make one that works?
extends Panel
var accum=0
func _ready():
set_process(true)
func _process(delta):
accum += delta
func _on_button_pressed():
get_node("Label").set_text(str(accum))
func ready1():
get_node("Button").connect("pressed",self,"on_button_pressed")
Thank you.