[ZIL] - Marking room as being visited

I’m making a game where you ‘enter’ rooms by connecting to camera feeds, but I don’t want it to print out the description of the room if it has been visited before (and if, of course, brief mode is on). I recall from some of the resources, either Learning Zil or the Zil Course, that it uses TOUCHBIT to mark a room as being visited. I tried, with my code to manually set it, but nothing happened. Does ZILF use something different?

1 Like

TOUCHBIT should work - here’s the library test case for it. How are you setting the flag?

1 Like

I figured out the problem, I was being stupid.
For those who see this post now or in the future, this is what’s going on.
Each one of my ‘cameras’ has a property, REF-ROOM, this will have the room which the camera is basically in (it tells the game to move the player into this room when viewing this camera).
The definition of the routine which handled the verb basically looks like this:

    <SET LOC <GETP ,PRSA ,P?REF-ROOM>> ;"Get the referenced room for manipulation"

The problem, of course is with just calling V-LOOK. The reason, obviously (I say obviously but this is all hindsight now), it just prints out the description of the room + any other objects in the room. It does not check if the player already has been in this room or not. So I thought V-LOOK worked in a way in which it obviously doesn’t.
Suffice to say, I fixed it by having it check, if it hasn’t been visited, then it prints out the room’s description.

Thank you for the help, sorry that I am daft.


Here’s the definition of V-LOOK:

           <DESCRIBE-OBJECTS ,HERE>)>>

That T is what makes it print the description even if the room is already visited, as expected for an explicit LOOK command. To suppress the description for visited rooms, you can copy that line and remove the T.

…but since this is all part of moving the player, you can use GOTO instead:

    <GOTO .LOC>>

Besides printing the new room description, GOTO also does a few other things related to movement, such as checking for a light source.

1 Like

Oh! I didn’t even know about GOTO, thank you very much, that’s a LOT cleaner to look at! Thanks for the help! :slight_smile: