Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Time Variable?

10 years ago

I want to incorporate a 24hr time variable into my storygame but, due to my lack of scripting abilities, I don't know how to make it continue from, say, 2259 to 2300 instead of 2260 and 2261 etc. Help Please!

Time Variable?

10 years ago

I assume you are wanting the time to change by 1 minute for every link you click. If so, here is my recommendation:

 

Create two variables, HOUR and MIN. Put this at the beginning of your global link page:

%MIN := %MIN + 1

IF %MIN  = 60 THEN

BEGIN

%MIN := 0

%HOUR := %HOUR + 1

END

IF %HOUR = 24 THEN %HOUR := 0

Time Variable?

10 years ago

Thanks!

Time Variable?

10 years ago

You're welcome. Of course, that method assumes that the same amount of time is going to pass for every link. Regardless, I hope it is useful.