var
seconds = 0
minutes1 = 0
minutes1_max = 9
minutes2 = 0
hour = 6
ToD = "AM"
time
world
New()
set background = 1
..()
spawn()
while (src)
sleep (3)
if (seconds <= 1)
seconds ++
else
seconds = 0
if (minutes1 <= 8)
minutes1 ++
else
minutes1 = 0
minutes2 ++
if (minutes2 >= 6)
hour ++
Shadow_change()
Save_Time()
minutes2 = 0
if (hour >= 12)
hour = 1
if (hour >= 12)
switch(ToD)
if("AM")
ToD = "PM"
if("PM")
ToD = "AM"
spawn(1)Time()
Save_Time()
get_time()
var
day=0
month=0
year=1500
world
proc
Save_Time()
var/savefile/save
save = new ("Time and Calendar/Current Time.sav")
save[day] << day
save[month] << month
save[year] << year
Load_Time()
var/savefile/load
load = new ("Time and Calendar/Current Time.sav")
load[day] >> day
load[month] >> month
load[year] >> year
Time()
day+=1
if(day==30)
day=1
month+=1
if(month==12)
year+=1
month=1
world<<output("It is now Year [year], Day [day], of Month [month].","chatoutput")
And the obj i want to auto update
obj/Timer
icon='hud_timer.dmi'
icon_state="background"
screen_loc="2,13"
layer=MOB_LAYER+2
New(client/c)
var/icon/min=new('hud_timer.dmi',"[hour]")
var/icon/sec1= minutes1 < 10 ? new('hud_timer.dmi',"0") : new('hud_timer.dmi',"[copytext(num2text(minutes1),1,2)]")
var/icon/sec2= minutes2 < 10 ? new('hud_timer.dmi',"[minutes2]") : new('hud_timer.dmi',"[copytext(num2text(minutes2),2)]")
sec1.Shift(EAST,13)
sec2.Shift(EAST,22)
src.overlays+=min
src.overlays+=sec1
src.overlays+=sec2
c.screen+=src
mob/verb
Show_Clock()
tick_timer()
mob/proc/tick_timer()
for(var/obj/Timer/t in src.client.screen)
var/icon/min=new('hud_timer.dmi',"[hour]")
var/icon/sec1= minutes1 < 10 ? new('hud_timer.dmi',"0") : new('hud_timer.dmi',"[copytext(num2text(minutes1),1,2)]")
var/icon/sec2= minutes2 < 10 ? new('hud_timer.dmi',"[minutes2]") : new('hud_timer.dmi',"[copytext(num2text(minutes2),2)]")
sec1.Shift(EAST,13)
sec2.Shift(EAST,22)
t.overlays=null
t.overlays+=min
t.overlays+=sec1
t.overlays+=sec2
I'm not getting a error but I want it to update on the players screen
It's a in game clock so the work has it's own time.