In a segment of a project I am working on for college, it is asked that one is able to steer another person using a kind of a walkie-talkie. However this requires some kind of global access to the person one should be able to control like that. One could probably do one of the following:
- Swap the player each time he asks the other character to do something, carry out the action and return
- Using the walkie talkie to change the views of the character (which does not look like an intuitive way of playing to me)
- Somehow make the other character visible in every room (which would be the one I would prefer the most)
Unfortunately I was unable to find anything like that in the documentation (visibility is only lighting in one room, reachability only opening/taking something out of something). Another way I thought of was saving the origin room of both, place them in one secret room, c1 then asks c2 to try doing something, both are placed to their positions, and the action asked for is carried out by c2.
However writing this as a before rules does not work, because it is already cancelled by the default check rule. On the other hand I cannot write:
Check asking c2to try doing something
because that is to general.
Any ideas, approaches or solutions are welcome!
The concept you're looking for is "scope" (Writing with Inform ch. 18.29.) The following places "c2" in scope and therefore makes it accessible everywhere:
You can also make it conditional:
The rest is fine tuning. The following prevents commands that aren't logical when c2 isn't physically in the same space (like "look at c2"):
This one prevents the "You can't reach into..." error when the issued command is invalid: