Remove all the party members but the main character.

palom

Villager
Member
Joined
Aug 23, 2017
Messages
8
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
Hi again, I have a doubt. It's possible to make a common event that remove all the characters leaving just a specific actor?. For example: We have a system that let you customize your party, so the actors that follows you will be always different dependin on the player. But during an event we need to let the Hero alone.

I'm looking for an efficient way to clean your party without using the "remove party member" command actor per actor because that could become an unnecesary long code on long terms.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
$gameParty._actors = [id of actor you want to keep in];
$gamePlayer.refresh()
$gameMap.requestRefresh()
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,359
Reaction score
15,172
First Language
English
Primarily Uses
RMMV
You might also want to save the current lineup, if you need to add the other party members back afterwards.

In that case, put this above Trihan's code:
Code:
$gameParty._savedActors = $gameParty._actors.clone();

and at the point where you want to add them all back, put this:
Code:
$gameParty._actors = $gameParty._savedActors.clone();
$gamePlayer.refresh();
$gameMap.requestRefresh();
 

palom

Villager
Member
Joined
Aug 23, 2017
Messages
8
Reaction score
0
First Language
spanish
Primarily Uses
RMVXA
Thank you very much. I'll apply those script call.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
That's a good point, Shaz.
 

Latest Threads

Latest Posts

Latest Profile Posts

Sneak peak of my upcoming update! Who's holding her, you may ask? Find out tonight!
10.PNG
BCj
Finished another GUI! Turn indicator wasn't made by me.

ff981f8dc50b03cf58038c644334b454.jpg


3cb092fdc00087acfa0a190fd891f0ed.jpg
Added a small refining scene to my game.

It makes sense that you try to focus on the squishy mages at the back of the party first, right? If the mage can out-DPS the enemy DPS before the latter can kill the tank in front, the fight becomes boring.

Forum statistics

Threads
115,243
Messages
1,088,316
Members
149,840
Latest member
Linami
Top