The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Inform 7 and Real Time

PrairieEyesPrairieEyes Registered User new member
Hello!
I noticed someone else asked and Inform 7 question here, so here goes mine!

I'm a beginner with I7. I'm currently using both Basic Real Time by Sarah Morayati and Real Date And Time by Ron Newcomb extensions.
I'm trying to do two things, and can't figure out the proper syntax or if it's even possible.

First:
I'm trying to add a number to the seconds remaining, and then divide it by 60 to have the number come out in minutes (though the /60 is not really a deal breaker)
I figured it would be something like this:
[([seconds remaining] plus 10800) divided by 60]
but I get an error that substitutions within substitutions are not allowed. Is there anyway to do this?

Secondly:
I want to check the real time gap between times the player types a particular input, and trigger an event if it is greater than 20 seconds. I had a friend suggest something like:

The player's time is a number that varies.
The player's previous time is a number that varies.
Instead of going west:
If ([player's time] minus [player's previous time]) is greater than 20:
now go east;
now the player's time is the player's previous time;

but I'm not sure how to get this to work either.

Thank you for any help

Posts

  • halkunhalkun Registered User regular
    Hello fellow I7 user.
    Your better bet is to ask the IF/I7 development forum, they are much better at explaining the nuances of the language. You can find the forum here.

    Keep in mind that real time functions only work with certain Glulx interpreters that support the Real-Time Clock. Some don't (For example, the terp I'm making doesn't). Also most IF players assume that the turn is the quantized unit of time and not the clock. So make sure that going in, you explain to the player that the clock is critical or you are going to have players WTF when they find that the wait command (Z) doesn't work.

Sign In or Register to comment.