Script call move event wrong order of movement

Hello,

I am modifying my project from simple eventing to using script calls in events. But I struggle with the move route script call. Something really is wrong with that or I am doing it wrong.

In my game you roll a die and your character moves the amount of fields your die number showed. I use field IDs to check if the character has to turn before he does the next step (to prevent him leaving the game board).

With the eventing everything was fine. But now since I try to do the same thing with script calls instead, it's not working anymore.

How it was before:

- you roll a die

- variable $move_points becomes the die number

- if $move_points >0 (do the below steps)

- $move_points -=1

- game checks if you are on a specific field ID that lets the character turn and turns him if needed

- then the character does a step

How it is now and it's wrong:

- you roll a die

- variable $move_points becomes the die number

- if $move_points >0 (do the below steps)

- $move_points -=1

- game checks if you are on a specific field ID that lets the character turn but does not turn him yet

- then the character does a step

- if $move_points = 0 the character does a step too much and then performs the turn he should have done at the start

The movement commands are in a common event inside a loop.

Do I do something wrong? Why does this happen? Do script calls flip the code order?

Please help! D:

Edit: 

I noticed, that if I cut the last 5 lines of code and insert it right after the first "if" state the movement works again and the field IDs are checked before making the whole movement. But the field IDs are only checked once instead of before every step. So the character leaves the field if he has to turn after he moves.

Do I need some "exit" commands inside the "if" statements?

Edit 2:

Maybe I found the issue. The Script Call is simply not waiting for the move action to perform and rushes through the code. Is there a way to let the code wait for the movement to happen, like it does with the eventing?

drag&drop.JPG

debug_old.JPG

movesetup.JPG

scriptcall.JPG
$move_route.wait = false might have something to do with it, hey?
$move_route.wait = false might have something to do with it, hey?
Oh I forgot to mention, that this screenshot is outdated. I changed it to "true" but the code still does not wait.

Original thread: https://forums.rpgmakerweb.com/threads/script-call-move-event-wrong-order-of-movement.41455/