Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Time Variable Influencing Which Page You Go To?

9 years ago

Hey guys,

I'm not experienced with the Advanced Editor and I am stuck on how to incorporate a time variable into my game so that the impact of your choice will be determined by the current time. I have seen a thread on how to incorporate a clock into the game, but I have no idea how to program that variable so that a choice will lead to an end game from a certain time period, and continue the game from a different time period. From the threads and articles I've seen, you can set a variable so an event happens when the variable is reached, but not a way to have a variable only activate when you click on certain options. 

Is there any way to possibly incorporate this, or is it impossible in the current Advanced Editor? 

All help would be appreciated, as if I can't find the way to apply this, it delivers a hammer blow to the central motif of my story. 

PS I guess I could set a page so that there are two options on the page, but one is only visible if the time variable is at a certain level, but I have no idea how I'd apply this if e.g. I had a zone where arriving between 8-9:30am or 2:30-4pm leads to death. Maybe I could have multiple clocks? 

Time Variable Influencing Which Page You Go To?

9 years ago

You can do what you suggested with link restrictions (the stop sign button). If you're trying to simulate a single link with three different periods of time, you'd need three links: one that shows up between 8 and 9:30, one between 2:30 and 4, and one when it's neither 8-9:30 nor 2:30-4.

Time Variable Influencing Which Page You Go To?

9 years ago
Use the link script and change the destination variable $DEST to the proper page based on the time variable.

IF %TIME = 5 THEN $DEST := @P15

Which would make the destination page 15 if time is 5.

Time Variable Influencing Which Page You Go To?

9 years ago

Great, thanks to both of you for this information.

Is it possible to apply both time and item scripts, so that for a certain destination to come up, you need both a certain time and to be carrying a certain item? Or would I have to make them separate, i.e. you use the item once you are at that page?

Time Variable Influencing Which Page You Go To?

9 years ago
IF %TIME = 5 THEN
IF %ITEMSTATE01 = 1 THEN $DEST := @P15

Replace 01 in itemstate with the number of the item you want to know that they have.