Converting to "up"

Looking at the page on How To Use Verbs from the documentation, it seems as though it should be possible to make the command CLIMB LAMPPOST equivalent to U; however, I can't work out any way to do this. Is there one?


I assume the lamppost is an object?

You could just move the player:

game.pov.parent = name_of_the_room_above_this_one

Or if you want to use the go command there's a few ways you could do it. You could do:

HandleSingleCommand ("up")

I'm not sure, but I think that might result in your turnscripts running twice (once for "climb lamppost" and once for "up")
That's also really inefficient, because it compares "up" to the pattern of every single command to see which one is the closest fit, and then once it's found it it does a bunch of other checks.

Or you could call the go command's script directly, like this:

do (go, "script", QuickParams ("exit", name_of_up_exit))

Or if you don't know the name of the exit, you could do:

do (go, "script", QuickParams ("exit", GetObject (GetExitByName (game.pov.parent, "up"))))

Thanks. I think the last of those would be best, because the object I want to handle is not actually a lamppost but another object which can go in various places. (As a result of my reading and commenting on blogs about Golden Age Detective fiction, I've learned to avoid "spoilers" very carefully!)


Log in to post a reply.

Support

Forums