Login
Remember
IF Answers
Ask a Question

# How to trigger an event to occur x turns after another event?

+2 votes
57 views
asked Mar 31 in Authoring by verityvirtue (23 points)
recategorized Apr 1 by Alex

This is a noob question - sorry. I have these scenes triggered to begin when the NPC Sister has been in the Living room for seven turns.

    Dinner is a scene. Dinner begins when Sister is in Living room for seven turns.

The compiler, however, refuses to compile this. Likewise, the compiler complains about this:

    After entering room x for the first time:
    say "Your mum calls out your name.";
    move Sister to Living room in seven turns.

Could anyone point me to where I've gone wrong? Thank you!

- inform7

## 1 Answer

+1 vote
answered Mar 31 by Ryan Veeder (290 points)
selected Mar 31 by verityvirtue
Best answer

In Inform 7 we can discuss future events only in a very restrained way. Your first problem is a minor wording issue; you need to say "Dinner begins when Sister is in Living Room for the seventh turn."

Your second problem requires a little bit more work. But only a little! From §9.11 in the documentation comes this example:

    An egg-timer is in the Chamber. "A plastic egg timer in the shape of a chicken can be pressed to set it going."

    Instead of pushing the egg-timer:
        say "It begins to mark time.";
        the egg-timer clucks in four turns from now.

    At the time when the egg-timer clucks:
        say "Cluck! Cluck! Cluck! says the egg-timer."

So, we can say a specific rule will trigger after a certain number of turns. A little inconvenient, but all that we have to do is give the intended effect its own rule, with its own name:

    After entering room x for the first time:
        say "Your mum calls out your name.";
        Sister shows up in seven turns from now.

    At the time when Sister shows up:
        move Sister to Living Room.

commented Mar 31 by verityvirtue (23 points)
Oh okay, thank you!

## Related questions

- How to cause an event to occur on every turn, but only when the action succeeds?
- [Inform 7] How to implement a blanket 'not understood' comment for an Inanimate Listener
- How do get an NPC's mood to worsen if I give it something it dislikes?
- How can I prevent appending (open), (closed) etc. to an object in Inform 7?
- How to allow an action only if the item is picked up?

...