problem with {exit:name}

I'm trying to get the command {exit.name} to work in the room description

If I use
{exit:Games Room}
then displayed is
'Games Room' and not the exits alias 'north' Also the hyperlink does not appear.

Is this an error in Quest or does this command not work in the room description?


Is "Games Room" your room? Then this command wil not work. {exit:name} expects the name of an exit like {exit:north}


I should add that {exit:north} will probably not work, as "north" is usually the alias of an exit.

An exit's name is usually just "exit" and a number. So you would want something that looks like {exit:exit68} unless you've specifically given the exit a name.

If the hyperlink doesn't appear, it probably means the specified exit isn't in the current room, isn't visible, or isn't an exit.


Hi mrangel.

I'm still not clear on where the exit68 comes from, is this a name the user creates or is the name from somewhere in Quest?
In my example if I go north from my current location then I go to the Games Room.


All objects must have a name.

When you're looking at the exit in the editor, there's a "Name" field, which is initially blank.

If you leave an exit with a blank name, it will be automatically given a name which is something like "exit68". (all unnamed exits are numbered when the game starts, if I understand correctly. There's no guarantee that adding a new exit won't change the numbers of existing ones, so if you're intending to use the exit in code at all, you should probably give it a name)

Or you could get the name of the exit (exit92 or whatever it happens to be) by doing either: {exit:{=GetExitByLink(game.pov.parent,Games Room}} or {exit:{=GetExitByName(game.pov.parent, "north"}}


Thanks mrangel.
I understand now.


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

Support

Forums