Activating a Switch during a message

Hey all, I was making a game in XP, but have decided to move it over to MV. I've managed to get most of the mechanics sorted except for this. Someone provided me a script that made the messages update letter by letter, play a sound for each letter update and turn on a switch for that message. It would then turn off the switch once it reached the end. I used this to control the speech animations, which are all stored in the common events database.

The message scroll is default with MV and I found a plugin that enable sounds, but I can't seem to find anything that activates a switch. Any help would be appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/activating-a-switch-during-a-message.75877/