How to draw map when teleporting player to room? SOLVED!

I type enter shuttle It's a script so it moves me to the shuttle airlock by teleporting player..But the map doesn't change ;o

Figured out sry

unfortunately, the map works based off the 'Exit' usage

you got to clear the map/grid (via turning the map/grid feature off), "teleport" (move via scripting: move via NOT using the 'Exits'), and then redraw the map/grid again (via turning back on the map/grid feature)

you may also have to at game start, have the 'player' goto every single room, to toggle the built-in 'visited' Boolean ("flag") Attribute, which is how the map works off of, as well, and then return the 'player' back to your starting room. Actually, you could just have the scripting do it (I think, but maybe not), instead of actually moving the 'player' to every room...

// in the 'game' special Object's 'start' script:

  room.visited = true

otherwise, if the above doesn't work, you'll have to actually physically move the player to each room:

  player.parent = room

// returning the 'player' back to your starting room:

on ready {
  player.parent = NAME_OF_YOUR_STARTING_ROOM

lastly, the map may not be able to handle your map/room placement and using scripting for traveling, so, you may have to toggle 'off' (false) the built-in 'visited' Boolean ("flag") Attribute of all the other rooms not connected to the room you're going to "teleport" to, before you "teleport" to that room, as well (similar coding to the top-most coding box stuff, except need a different room list obviously, and you'd change the 'visited' to false: room.visited = false)

here's the all/most of the map/grid coding stuff: (scroll down to the 'g' section, as it's in alphabetical order, and find the 'grid_XXX' Scripts/Functions)

I've not worked that much with the 'map/grid' feature, so hopefully others will help you more with it, who've got actual experience with it

THanks ill try also i got an error now when teleporting to the map ever since i changed the name of the map..... It says Error running script: Dictionary item,s (Coordinates, coordinate) key given blabla in french

"The given key was not present in the dictionary"

Please help:

This is a known issue. There are some suggested work-arounds in the docs, about two thirds down this page:

Thank you guys also The Pixie that worked like a charm woot ;)

Log in to post a reply.