Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Record Party Position

Hello, I'm requesting for a script that records which actor is in which position in the party into the variables.

To clarify, I want this script to:
-check to see which actor number is in which position of the party.
-record the actor number into a variable that the position is linked to.

For example:
If Actor "0001: Ralph" is in the party, and he is the 4th member in the party. I want variable 4 of 4 different variables(1 for each party position) to record the number 1.
So, if Actor "0005: Mia" is in the 1st position of the party, the 1st variable (of the four variables) will record the number 5.

EDIT:
I also want to know is if it's possible to modify Dargor's Party Changer Script, located here:
http://www.rmxp.org/forums/index.php?topic=42719.0

And what I want to do is make it so that if the player tries to use the party member changer in battle to call a common event immediately.

What I want it to do is to record who's in the party and record what position that character is in (with that line of code above) if they decide to change the party around, but most of that can be accomplished with a common event.

This also has to be compatible with RPG Maker VX.

Thank you.
 
It's quite simple. You only need a script call to do that.
Code:
$game_variables[variable_id] = $game_actors[actor_id].index
This will store $game_actors[actor_id]'s position (called index) in $game_variables[variable_id]
Note that the first position (index) is 0, not 1.

Take care!
-Dargor
 
Ahhh thank you. Works splendidly.

Hmmm, I have another request, but I'm not sure if I should make another topic because it relates to this.

Anyway, I'll post it here, and if someone can tell me what I should do, then I follow that...

What I want to know is if it's possible to modify Dargor's Party Changer Script, located here:
http://www.rmxp.org/forums/index.php?topic=42719.0

And what I want to do is make it so that if the player tries to use the party member changer in battle to call a common event immediately.

What I want it to do is to record who's in the party and record what position that character is in (with that line of code above) if they decide to change the party around, but most of that can be accomplished with a common event.

Sorry, I would of requested this is in the initial post, but I just thought of it.

EDIT: Hmmm, also, if calling a common event is not possible, can it instead turn on a switch if the player accesses the party changer while in battle? I'm pretty sure I have the line of code:
Code:
$game_switches[9] = true
but I have no idea where to put it in the script. Could someone help me?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top