Enter and exit room with different scenarios - Inform 7

If the goal is to have the event happen no matter what the player does (waiting, examining, talking, etc), I’d use an Every Turn rule.

Every turn when the player can see Joel and Joel is in the Unified Command Room:

The end result is similar, but there’s a key difference: you can always expect Every Turn rules to trigger, no matter what else is going on. By default, the first After rule that applies will cut off all the others (and also all the Report rules), and you need to explicitly “continue the action” to avoid this behavior.

2 Likes

I am not sure if I am doing this correct but if I change the code to

Try "After doing anything in the Unified Command Room when the player can see Joel:"
	say "Lets go to the Strategy Meeting Room. says Joel.";
	now Joel is in the Strategy Meeting Room.

the I get the following error:

Try error1

This event should actually happen on a number of occasions with different people as meetings will be held in different rooms and sometimes people from one room will be in the next meeting room as well.

Why I am trying this is when I make Joel active in room1 and the meeting moves to room2 and Joel will be that meeting as well the I cannot make Joel active in room2 as it sees Joel as part of Room1.

Maybe3 I am approaching this whole thing wrong and there is a possible way to just deactivate Joel from room1 and activate him again in room2 and so on.

That will be an much easier way but I do not know how to accomplish that.

Thanks for all your help but this code seems to do the trick for now:

Every turn when the player can see Joel and Joel is in the Unified Command Room:
	say "Lets go to the Strategy Meeting Room. says Joel.";
	now Joel is in the Strategy Meeting Room.

I will see how it goes and if I can use it with the rest of my code , if not I will be back. :smile:

I meant to sub in what I had in quotes for your rule preamble (the bit that starts with After and ends with a colon)- “try” is actually something you can use in the most of a rule to force a player action, but it doesn’t belong in a rule preamble like this.

With that said, @Draconis’s point about how After rules function might mean it’s better to use an every turn rule instead if you have other effects you want to have fire off beyond just this one. I didn’t really understand your response to him - if characters are moving around a bunch you might want to consolidate into a single large rule to handle this rather than having a bunch of separate ones, but there shouldn’t be any reason why an every turn rule would work differently than an after rule in terms of the conditions you can put on it.

Thanks your code did the trick

Thanks, every turn rule did the trick.
As a newbie it is like learning a new language but I will get there.