how can I move the player to a random room where the map has been created yet?
And how can I disable the frame map for the intro and then reactive it again?
JS.ShowGrid(0)
JS.ShowGrid(game.mapsize)
How do map levels work? I wrote names but it doesn't show on the map...
<function name="Grid_DrawRoom" parameters="room, redraw, playerobject">
<![CDATA[
if (room.grid_render) {
if (redraw or not Grid_GetRoomBooleanForPlayer(playerobject, room, "grid_isdrawn")) {
if (room.parent <> null) {
Grid_DrawRoom (room.parent, redraw, playerobject)
}
JS.Grid_DrawBox(Grid_GetGridCoordinateForPlayer(game.pov, room, "x"), Grid_GetGridCoordinateForPlayer(game.pov, room, "y"), Grid_GetGridCoordinateForPlayer(game.pov, room, "z"), room.grid_width, room.grid_length, room.grid_border, room.grid_borderwidth, room.grid_fill, room.grid_bordersides)
if (LengthOf(room.grid_label) > 0) {
label_x = Grid_GetGridCoordinateForPlayer(game.pov, room, "x") + room.grid_width/2.0
label_y = (Grid_GetGridCoordinateForPlayer(game.pov, room, "y") + room.grid_length/2.0) - 0.5
// Grid_DrawLabel(x, y, z, text)
JS.Grid_DrawLabel(label_x, label_y, Grid_GetGridCoordinateForPlayer(game.pov, room, "z"), room.grid_label)
}
foreach (exit, AllExits()) {
if (exit.grid_render and exit.parent = room and exit.grid_length > 0) {
Grid_DrawLine (Grid_GetGridCoordinateForPlayer(game.pov, exit, "x"), Grid_GetGridCoordinateForPlayer(game.pov, exit, "y"), Grid_GetGridCoordinateForPlayer(game.pov, exit, "end_x"), Grid_GetGridCoordinateForPlayer(game.pov, exit, "end_y"), "black", 1)
}
}
Grid_SetRoomBooleanForPlayer(playerobject, room, "grid_isdrawn", true)
}
}
]]>
</function>