Newquaza 96

Veteran
Veteran
Joined
Sep 5, 2014
Messages
35
Reaction score
6
First Language
Italian
Primarily Uses
In my RPG Maker MV game, certain events require the player to choose one party member to interact with something.
For that reason, i have managed to make a multiple choice system that checks for the number of alive party members and gives a number of choices based on that. (if all 4 party members are alive, the game will display 4 choices, if 3 party members are alive, the game will display 3 choices, and so on)
For that purpose, i have made it so one variable is used to store the position in the party of the selected party member. However, i now find myself in need to translate the number of the position in the party of an actor to that actor's actual ID.
Basically, if i chose the actor who is in spot n°2 in the party, i need to make it so a variable is set to the actor ID of the actor who is in spot n°2.
With my limited knowledge of Javascript, i tried many different things and i also tried googling the answer, but i didn't get exactly what i was looking for.
This is what i was trying to work with up until now
$gameVariables.setValue(15, $gameParty.members($gameVariables.value(18)));
I thought this would make it so Variable 15 would be set to become the ID of the actor in the position relative to Variable 18, but it obviously doesn't work.
I tried using
$gameParty.members()[$gameVariables.value(18)].Id()
and other variations of that, since i have an extremely limited knowledge of Javascript and i can't find a list of all the terminology/syntax for RPG Maker MV anywhere. The thing is that i really don't know what to write in order to get the ID of the actor in spot n°x of the party (where x is the value of a variable).
Thank you very much in advance, and sorry if i was confusing. I hope i'm posting in the right section.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,757
Reaction score
8,966
First Language
German
Primarily Uses
RMMV
there is absolutely no need for scripts here - that is one of the most basic functions of the control variable command.

Just use the control variable command and switch the game data section from "map ID" to "Party member x's ID" (where you select which party members ID you want)
 

Newquaza 96

Veteran
Veteran
Joined
Sep 5, 2014
Messages
35
Reaction score
6
First Language
Italian
Primarily Uses
Oh my lord. I didn't even notice.
Thank you SO much. This helps out a ton.
I suppose this thread can be closed, then? Sorry for the super silly question.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hi everyone! Enjoying this nice long weekend. How are you all doing? :)
I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg

Forum statistics

Threads
118,427
Messages
1,115,874
Members
155,381
Latest member
reallynatalie
Top