Made an exit, turned off visible- have a script turn it back to being visible.
But the exit (on the map) is still there. I can remove the exit line by setting the map length to zero, but then the map will be screwed up after I show the exit.
So unless I can change the map length with a script, I need it to stay length of one on the map. But not show the exit line until the exit is actually visible.
Sadly, the map doesn't care whether exits are visible or not.
One solution I can suggest would be instead of making the exit invisible, put it in a container. (It's perfectly legal to have an exit in a container, it just won't be visible). Then during the event that would make it visible, move it back into the room.
If the player is already in the room so you want it to appear right away, you will need to immediately run the functions
Grid_CalculateMapCoordinates (room, player) and then
Grid_DrawPlayerInRoom (room) to redraw that part of the map.
When you say container do you mean an actual container object?
Also I cannot find out how to move Exits. I tried to move object, and that won't show the Exits as valid objects to move.
I figured out how to move exits- I used the expression box from MoveObject() to move a named exit.
However now the map won't render the new exit line, and the Quest Functions don't have any documentation explained what they do and what arguments to use.
the Quest Functions don't have any documentation explained what they do and what arguments to use
The first function you need to call is
Grid_CalculateMapCoordinates. It calculates the coordinates where the exit should be drawn on the map. It takes two parameters: The first is the room that the exit has just been moved to, and the second is the player object.
The second function you need to call is
Grid_DrawPlayerInRoom. It redraws a room on the map, and draws all the exits leading out of it. It takes one parameter, which is the room.
So when you want to make the exit visible, the script will look like:
MoveObject (named exit, some room) Grid_CalculateMapCoordinates (some room, game.pov) Grid_DrawPlayerInRoom (some room)
(replacing named exit and some room with the actual names of the exit and the room, of course)
Actually, it looks like this might not work; Quest might simply decide "I've already drawn this room" and not do it. If that happens, you would need to add an extra function call:
MoveObject (named exit, some room) Grid_CalculateMapCoordinates (some room, game.pov) Grid_DrawRoom (some room, true, game.pov) Grid_DrawPlayerInRoom (some room)