How to trigger an action when moving a character into a room

I need to have something happen (an NPC greet the player, basically) when a character is moved into another room, for the first time, as opposed to entering the room, of the players own free will.

After messing around for a while… i got

carry out going to the room:

to work, but this only triggers when the player walks in by his own free will… not when he is moved there.

I’m not new to programming (i’ve been programming computers for about 25 years) and maybe that is the problem. I wrote a game in TADS many years ago, and that seemed to make more sense. I have been fighting the temptation to go back there… this is a quest now. I will make this work.

Thanks for any help you can provide!

Take Care,


I’m not 100% sure, I am new to Inform myself. Here’s my stab at the problem:

“Move” in this case is a phrase and not an action. Therefore, you can’t have rules that apply to it like After, Instead, and so forth.

What you can do is create a new phrase, called something like Teleport, and put the logic in teleport that does what you are talking about. Then instead of moving someone around, you just “teleport them”.

This is somewhat awkward wording, but it should do what you want:

Every turn when the player is in the Greeting Room and the Greeting Room was not visited: say "Bob says, 'Well, hello there.'"

“…was not visited” actually means “was not visited at the beginning of this turn.” So the rule will only fire the first time you enter the Greeting Room, regardless of how you got there.

It seems you could also use a boolean state that you change after the teleporting and then change back after the desired action.

thanks for all of your answers! I got this to work.

sorry for the delay in answering you guys, real life got in the way, again!

BTW, I’m working on a text adventure based on Inferno – the larry niven / jerry pournelle version…

… i just wish I had time to do it!