|
Author
|
Message
|
groza528
Honorary Member
24 May 2004

Location: Maine
|
I can tell you why your script doesn't work.
GameHour is a float variable. It will never be exactly equal to anything because it goes out to 6 decimal places or something like that. You have to use inequalities. I recommend that you search for a range, like: if you start the script at 15.263 o'clock, your script should be looking for the time to be between 14.263 and 15.263. By looking for a range you avoid the issue that your inequality might return true prematurely, at midnight. Alternatively you could be looking for GameHour > 15.263 and Day != StartDay
_________________ Imagine my insult to find that "Raw Glass has no effect on you." I became very huffy at the implication that my intelligence could not be lowered further. Then again, I did just eat a piece of glass.
|
Fri Mar 16, 2007 10:24 pm
|
Send private message Reply with quote
|
up
|
Gez
Honorary Member
22 Jul 2005

Location: Bruma. Well, Brummagem.
|
Another possibility is to use another variable. Something like this:
| Code: |
short ShortHour
set ShortHour to GameHour
if ( ShortHour == 15 )
|
The game will automatically round the value.
|
Sat Mar 17, 2007 9:21 am
|
Send private message Reply with quote
|
up
|
Bloodthirsty Crustacean
Honorary Member
02 Feb 2007

Location: Elsewhere
|
Right, thanks for your help guys.
I have now fixed the timer script, so everything should be in order. I'd still like some external testing, but that can be done later. To confirm this thing's now 'officialy' finished, do I set it to 100%? (Which I'm going to do anyway, but will that make people realise it's ready for merging/reviewing?)
_________________ a man builds a city
with Banks and Cathedrals
a man melts the sand so he
can see the world outside
"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
|
Sat Mar 17, 2007 10:19 am
|
Send private message Reply with quote
|
up
|
groza528
Honorary Member
24 May 2004

Location: Maine
|
Yep, that should do it. Lud should move it to reviewing when he sees it.
Thanks for the tip about the shorthour Gez; I didn't know that
_________________ Imagine my insult to find that "Raw Glass has no effect on you." I became very huffy at the implication that my intelligence could not be lowered further. Then again, I did just eat a piece of glass.
|
Sat Mar 17, 2007 11:39 am
|
Send private message Reply with quote
|
up
|
groza528
Honorary Member
24 May 2004

Location: Maine
|
BC said he's already corrected these errors and sent me this file. Moved back to reviewing.
_________________ Imagine my insult to find that "Raw Glass has no effect on you." I became very huffy at the implication that my intelligence could not be lowered further. Then again, I did just eat a piece of glass.
|
Sat Aug 25, 2007 12:44 pm
|
Send private message Reply with quote
|
up
|
theviking
Honorary Member
08 Jan 2007

Location: Alphen aan den Rijn, the Netherlands
|
Approving, only one mouth claim remaining in reviewing, I think that doesn't stay long there...
|
Sat Dec 08, 2007 6:00 pm
|
Send private message Reply with quote
|
up
|
|
|