and i'm having a problem where when it is displayed on the hud, it tends
to get the wrong Sun/Moon Display.
Here is the Clock Code I coded myself.
*I Feel somewhat proud, lol and the clock with seasons and such works fine*
client
var/hr=5
var/min1=0
var/min2=0
var/ampm="AM"
var/season="Spring"
var/date=1
client/proc/CalUpdate()
if(season=="Spring")
if(date==30)
date=1
season="Summer"
if(season=="Summer")
if(date==30)
date=1
season="Fall"
if(season=="Fall")
if(date==30)
date=1
season="Winter"
if(season=="Winter")
if(date==30)
date=1
season="Spring"
client/proc/ClockUpdate()
//note its sleep(5) just for testing purposes,
//if it was the origional sleep(150) it would
//take longer to see if the code worked right
time
//5am to 6am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//6am to 7am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//7am to 8am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//8am to 9am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//9am to 10am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//10am to 11am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//11am to 12pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;ampm="PM";SunMoonHudUpdate()
//12pm to 1pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr=1;SunMoonHudUpdate()
//1pm to 2pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//2pm to 3pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//3pm to 4pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//4pm to 5pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//5pm to 6pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//6pm to 7pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//7pm to 8pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//8pm to 9pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//9pm to 10pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//10pm to 11pm
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//11pm to 12am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;ampm="AM";date+=1;CalUpdate();SunMoonHudUpdate()
//12am to 1am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr=1;SunMoonHudUpdate()
//1am to 2am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//2am to 3am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//3am to 4am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
//4am to 5am
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1+=1
sleep(5);min1=0;hr+=1;SunMoonHudUpdate()
goto time
Here is the SunMoonHudUpdate Proc which is in problem
*They come up all right, its just the sun/moon states
get all jarbled up, especialy around the 12am/pm*
client/proc/SunMoonHudUpdate()
if(hr==1)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==2)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==3)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==4)
if(ampm=="AM")
new/obj/SunMoonHud/b(src)
if(ampm=="PM")
new/obj/SunMoonHud/e(src)
if(hr==5)
if(ampm=="AM")
new/obj/SunMoonHud/b(src)
if(ampm=="PM")
new/obj/SunMoonHud/e(src)
if(hr==6)
if(ampm=="AM")
new/obj/SunMoonHud/c(src)
if(ampm=="PM")
new/obj/SunMoonHud/f(src)
if(hr==7)
if(ampm=="AM")
new/obj/SunMoonHud/c(src)
if(ampm=="PM")
new/obj/SunMoonHud/f(src)
if(hr==8)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==9)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==10)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==11)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
if(hr==12)
if(ampm=="AM")
new/obj/SunMoonHud/a(src)
if(ampm=="PM")
new/obj/SunMoonHud/d(src)
obj/SunMoonHud
icon='SunMoonHud.dmi';name="";layer=25
a
icon_state="1"
New(client/C)
C.screen+=src;screen_loc="1,1"
b
icon_state="2"
New(client/C)
C.screen+=src;screen_loc="1,1"
c
icon_state="3"
New(client/C)
C.screen+=src;screen_loc="1,1"
d
icon_state="4"
New(client/C)
C.screen+=src;screen_loc="1,1"
e
icon_state="5"
New(client/C)
C.screen+=src;screen_loc="1,1"
f
icon_state="6"
New(client/C)
C.screen+=src;screen_loc="1,1"
also I was wondering, since it is in Client *The time proc and stuff that it
* does that mean if it is like 6:40 on 1 computer, it will be the same on
another computer* If not Could some1 help me with that too.
Here is the icon file i'm using for the moon states so it will help if ne1 needs
it to help fix this code
SunMoonHud.dmi
you want but give me some credit somewhere please.
or if you modify it to the point where it is shorter or somewhat e-mail me the code you used to [email protected]