I think it's possible if you use PuzzleScript+. There is a tool to replicate that.
It's called "Goto level". Try the "Goto" exemple.
PuzzleScript+ (auroriax.github.io)
It's called "Goto level". Try the "Goto" exemple.
PuzzleScript+ (auroriax.github.io)