RPG Maker MZ Tutorial: SCRIPT For Party Member Names As Show Choices
I hope this video isn't too rambling or confusing! This tutorial highlights a Script that takes whoever is in your party and uses those names as Show Choices. This is very important if the number of party members and who is in the party might change. This is much more efficient than one of my previous tutorials and I am using this Script a lot in my experiments.
In the video I reference a Thread on RPGMAKERWEB.COM (forums) that has a detailed explanation of how to try to understand this Script. I want to give a big thanks to the users Caethyril and Rlyeh. Rlyeh initially proposed this Script and Caethyril took the time to really try to explain how it works. As I said in the video, even though I have read through the explanation a bunch of times, I am still a little shaky on some of the concepts. Here is the link:
https://forums.rpgmakerweb.com/index.php?threads/script-to-identify-if-a-party-slot-is-empty.153066/page-2
I also mentioned that I would post the Script here in case you can copy and paste it. Remember that copying and pasting text into a Script field can sometimes cause problems. Especially with single quotation marks. Here is the Script: (PLEASE NOTE THAT YOUTUBE WON'T ALLOW THE USE A ANGLED BRACKETS, WHICH ARE GREATER THAN AND LESS THAN SIGNS. IN THE SCRIPT BELOW, THERE ARE TWO PLACES WHERE I INSERTED THE TEXT "GREATER THAN SIGN". YOU SHOULD REPLACE THOSE WORDS WITH THE APPROPRIATE SYMBOL FOR IT TO WORK! REFER TO THAT PORTION OF THE VIDEO TO SEE WHAT IT LOOKS LIKE.)
const choices = [];
$gameParty.members().forEach(m =GREATER THAN SIGN choices.push(m.name()));
choices.push("Nevermind");
$gameMessage.setChoices(choices, 0, choices.length-1);
$gameMessage.setChoiceBackground(1);
$gameMessage.setChoicePositionType(1);
$gameMessage.setChoiceCallback(n =GREATER THAN SIGN {
$gameVariables.setValue(106, n!=choices.length-1?n:-1);
});
this.setWaitMode('message');
I hope this helps people. I know that this has really helped me a bunch.
If you have any questions, suggestions, or comments, please let me know in the Comments section. If these videos are helpful to you, please consider Liking, Subscribing, and Getting Notifications.
Good luck and happy game making!
Other Videos By ZombieKidzRule!
Other Statistics
RPG Maker MZ Statistics For ZombieKidzRule!
ZombieKidzRule! currently has 11,262 views spread across 113 videos for RPG Maker MZ. Roughly a days worth of RPG Maker MZ videos were uploaded to his channel, roughly 30.34% of the content that ZombieKidzRule! has uploaded to YouTube.