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
I tried using
Thank you very much in advance, and sorry if i was confusing. I hope i'm posting in the right section.
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
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
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.