Check if actor 2 has the same name as actor 1

Hello everyone, 👋
I have a quick question. I want to create a conditional branch to check if the name of actor-1 is the same as actor-2.
More specifically: The player (actor-1) types their own name at the beginning of the game. When the player meets actor-2, the game asks them to give actor-2 a name. But if they name him the same as actor-1, he will reject it.

Does anyone know how to create a conditional branch like this? Because the standard 'Conditional branch: actor: name' won't work.
Maybe try thiis
1645984455535.png
Yes. It works perfectly. 😂 Thank you for replying to this thread.
Hi,

Should this work in MV too? I'm not sure if I'm doing it wrong but I couldn't get it to work. I want to do something similar.
Hi,

Should this work in MV too? I'm not sure if I'm doing it wrong but I couldn't get it to work. I want to do something similar.
MV uses a different scripting language. I don't know a lot about MV, but I did find a list of MV script calls. Hope this helps: https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-mz-script-call-list.46456/
Ouch, my brains =(

Thanks though, I'll try to figure it out.
The MV equivalent is

$gameActors.actor(1).name() === $gameActors.actor(2).name()
The MV equivalent is

$gameActors.actor(1).name() === $gameActors.actor(2).name()
Aw, brilliant, thanks, that worked perfectly!

Original thread: https://forums.rpgmakerweb.com/threads/check-if-actor-2-has-the-same-name-as-actor-1.145285/