Teleporting in battle

Hi hi!

I am making a monster able to teleport the party to "another dimension" if they can't defeat him after 5 turns, but for some reason is not working, these are my attempts:

Code:
Fadeout screen
End battle
Teleport player: Another Dimension
fadein screen
This doesn't work because it seems like code stops when the battle ends, teleport and fadein don't run

Code:
Teleport player: Another Dimension
End battle
This make the enemies and actors wait forever, it seems like teleporting make the battle unable to end.

There is any way to teleport the party to another map while in battle?

Thank you!
try enabling a switch(in battle instead of in battle teleport) and use the switch after battle end, in order to do the teleport..
switch usage should work anywhere.. you only need to figure out how to properly trigger the battle end..
And having any parrallel event or update stuff that recognizes the switch change and triggers the teleport after battle end

edit
i think you cant teleport in battle because that would need to trigger "change map of the $gameplayer" which probably only works in map mode
(about "fade in" and "fade out" i am not sure but "fade in" should work on map aswell? .. right after battle if switch is true ect.. same switch trigger as the teleport on map after battle)
yes and no.

you can't do that directly because the battlescreen is not a map and the battleinterpreter is a different function than the map interpreter for map events.

what you can do is trigger a common event to run after the battle is aborted.
make it a parallel process conditioned at a switch, have it contain your transfer and whatever else you want, and end it by switching off the switch it needs to run.

then it will be executed after each battle where you switch that switch on.
Ok, that works, thank you 😂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/teleporting-in-battle.152351/