Look at adjacent rooms

cole
This code will give the player the ability to look in adjacent rooms by typing i.e. "look north", "look s", etc. and also to look at individual objects in those rooms. Everything has been done using the GUI.

There is a "Help" command in the file attached which will explain what changes I made to the code and what you have to do in case you want to override the "lookat" command.

There currently is a problem with dark rooms. If, for example, you were to look at an adjacent room which is dark you would still be able to see all objects inside of it and could inspect them individually.
I couldn't find any other errors, but I would be happy if somebody would tell me in case he/she finds some. I would also appreciate it if somebody could tell me how to resolve the problem with the dark rooms.

Edit: All problems (I know of) like the problem with looking at dark rooms have been fixed.

R2T1
Cole,
I had a quick look and play. I found that it doesn't respond to eg. L N (using the short form of Look)

As for the dark rooms, you should be able to add another if in your logic to test for the room attribute dark and if true give an appropriate response that 'it is too dark to see anything within'. You could even exclude revealing the exits from there too if desired.
I'm not sure where in your functions you would implement this but I believe it can be done this way. You would probably need one test in the room descriptions before giving the exits (possibly before the IF [expression] i = game.autodescription_youcango )
the other would go in either (or both) of the ResolveName... functions.

I haven't tested this though.

cole
Thanks for the tip, I will try to implement it as soon as I have time. :D

There is just one thing I'm unsure about. You said the short form of "look" wouldn't work, but it doesn't even work in the unedited quest code as far as I know. In case I'm mistaken, I don't know how that could have happened since I haven't changed the patterns of the "lookat" or "lookdir" command in any way.

This topic is now closed. Topics are closed after 14 days of inactivity.

Support

Forums