AM/PM switching
brice2109@me.com
Member Posts: 4
Hi everyone, I've been working on making a 12 hour game clock. I have it set up so that every second equals a minute in the game world. The clock works just fine, I've just been having trouble getting the AM to change to PM. I have it set up right now so that every time clock reaches 12:00, add one to "ampmcounter"(counter starts at one). Im trying to set it up so that when ever the ampm counter is an even number, my boollian attribute "even" is set to true, which in turn changes a text attribute i have to PM. Can anyone help me with the code to identify the number in the ampmcounter as an even number in an attribute rule(or offer some alternative). Thank you.
Comments
Hi @brice2109@me.com
Not sure how you've got your attributes set up, so a bit of a guess, something along the lines of:
Display Text WhichSide
When attribute MyHour =12 and MyMin = 0
Change Attribute MyHour to 0
When AM is false
Change Atribute WhichSide to AM
Change Atribute AM to true
Otherwise
Change Atribute WhichSide to PM
Change Atribute AM to false
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
if 1 = [gametime]%2
change to odd
if 0 = [gametime]%2
change to even