Hm, worth to try!
So, i tried to use variables in the map scripts.
The game just crashes on loading the second map.
Script in first map:
global.value=1
second map:
if $global.value == 1 {
player teleport 5 24}
map return
EDIT:
Forget it. i had a wrong formating.
But even with the right formating, it does not teleport the player to the coordiantes.
second map:
if $global.value == 1 {
player teleport 5 24
}
map return
Last EDIT:
So, i figured it out. but its kind of janky.
Hub map has NOTHING in the map script an NO player start!
load the map, without start object and figure out the rough location (sadly its not x0 y0 more between x3 y3 and x4 y4).
Put some triggers at that coordiantes with a script like this:
player teleport 5 24 //initial starting position
if $global.value == 1 { //global variable is set in the second map
player teleport 19 4 //position of the player after exiting second map
}
map return
In my case the Map i want to go to and back to the hub is a bar.
In the map script of the bar set the global variable to 1
global.value=1
Put a trigger at the exit of the bar to load the Hub map.