Transfer player and delete event rpg maker mz

Hey everyone !

I'm having trouble moving the player to a specific room while simultaneously removing the event that triggers the movement.
I'll show you a screenshot to illustrate the problem. (It's on French sorry)
1763100250619.png


The thing is, I want the player to move to a room, but I only want this event to happen once. I want the event to stop triggering when the player returns to the starting room.

I understand how to use a local switch to permanently delete an event, but it seems that moving the player before applying the local switch prevents the event from being deleted.

I apologize in advance if this question has already been asked, but I've been searching for a few days and haven't found a solution... Thank you to anyone who can help !
place your switch ABOVE the transfer as it keeps running what is below.
another way is to activate the events switch by scriptcall for its mapID
eventID, selfswitch and boolean so it won't run again.

that is only an alternative.
This is related to the event's trigger (Déclencheur). When an event's page changes, or the player transfers to a different map:
  • A Parallel event will stop immediately.
  • An event with any other trigger, e.g. Autorun, will continue processing the rest of its commands.
So maybe change the event trigger? It depends on context.

If this event needs to be Parallel, you could try this setup instead:
  • Parallel event:
    1. Page 1: Condition = Switch 52 is ON; turn on Switch X.
    2. Page 2: Condition = Switch X is ON (not Self-Switch A).
  • Autorun event (new):
    1. Page 1: Condition = Switch X is ON; show text, transfer, turn on Self-Switch A.
    2. Page 2: Condition = Self-Switch A is ON.
I.e. use 1 switch to both disable the parallel checker and make a "do once" event process the results.
place your switch ABOVE the transfer as it keeps running what is below.
another way is to activate the events switch by scriptcall for its mapID
eventID, selfswitch and boolean so it won't run again.

that is only an alternative.
This is related to the event's trigger (Déclencheur). When an event's page changes, or the player transfers to a different map:
  • A Parallel event will stop immediately.
  • An event with any other trigger, e.g. Autorun, will continue processing the rest of its commands.
So maybe change the event trigger? It depends on context.

If this event needs to be Parallel, you could try this setup instead:
  • Parallel event:
    1. Page 1: Condition = Switch 52 is ON; turn on Switch X.
    2. Page 2: Condition = Switch X is ON (not Self-Switch A).
  • Autorun event (new):
    1. Page 1: Condition = Switch X is ON; show text, transfer, turn on Self-Switch A.
    2. Page 2: Condition = Self-Switch A is ON.
I.e. use 1 switch to both disable the parallel checker and make a "do once" event process the results.
I tried both and it's work, thank you so much for your time ! ^^

Original thread: https://forums.rpgmakerweb.com/threads/transfer-player-and-delete-event-rpg-maker-mz.181019/