You could make it so that every time the hero's X var. is = to the bottem or top of the map (same for the left/right sides to just Y var. insted of X), then you teleport somewhere using branches.
correct, the event is a parallel process which looks a bit like
heroX= hero X tile
heroY= hero Y tile
if y=0 then
-teleport(upper map)
if y=19(let's assume it's a 20X20 map) then
-teleport bottom map
if X=0 then
-teleport left map
if X=19 then
-teleport right map
you might notice there are now 4 points in the map which give 2 true conditions
0,0 0,19 19,0 19,19
but in order to reach them you must first walk on a tile near them that will teleport you right
like 18,0 or 0,18 0,1 or 1,0 and so on