How to make a clock.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lazulily

Like a digital/analogue clock with numbers and everything that runs in real time
(hours: minutes) but is also independent to OS time, so it can be paused and manipulated in game.

:bust_in_silhouette: Reply From: Beatrix

here is the code

extends Node

var am_pm = "pm"
var hour = 0
var minute = 0
var week = 0

    if minute == 60:
    	minute = 0
    	hour += 1
	if hour == 13:
		hour = 0
    	if am_pm == "am":
			am_pm = "pm"
			am_pm = "am"


After You Copy The Code Add A Timer And Set It To [60Seconds] With AutoStart

connect the timer node to the script and add this to the script

minute += 1