Set Variable Depending on Active Face

Hey! 👋

I was wondering if anyone could help make a a small script.

In my project, I have a separate message sound play depending on who is talking, determined by a variable. Normally, I have to manually set this before every text box of every event, but I was hoping I could have this variable automatically set depending on who is talking.

Pretty much, I'd love to have the script check which face is being used (before the text actually starts to scroll). If the face (filename, index) is defined in the script, set the variable to X, otherwise don't to anything.

I hope I explained this in a way that makes sense. Please do ask if you have any questions though.

Thank you! 😤

Moved to Script Requests



Edit: So this appears to be a duplicate. We'd prefer to have only one post, so I'll lock this one and keep the other one open as it has a reply in it that is relevant to the request.

Original thread: https://forums.rpgmakerweb.com/threads/set-variable-depending-on-active-face.95601/