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,706
Reaction score
2,807
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
42,847
Reaction score
14,981
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,706
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
That's a good point, Shaz.
 

Latest Threads

Latest Profile Posts

The one thing I've always struggled with is creating a story, it halts every single project I've ever worked on. We must be in the twilight zone because I've actually come up with a plot, from beginning to end (it kinda wrote itself). I may very well be on my way to creating my first proper little game, yay!
My first 256 x 256 Map :kaocry:

Oh, wow!
6VDEms4.png


Still need one or two "placeholder" asset things and then I'm venturing into custom windows + menus!
(I'm a little scared, lol)
In the past hour I've both joined and left the RPG Maker subreddit. So many memories were made. Power to the gam mak!
So the number one complaint I get so far is the levels are simply too large. What's funny is in testing I deemed levels taking too long and actually shortened them. Figuring I could beat them in 5-6 minutes so players would be able to do so in probably double that. I was apparently very mistaken, only one player has mentioned even reaching the second area. Let alone the first boss. :kaoswt:

Forum statistics

Threads
113,683
Messages
1,076,645
Members
147,704
Latest member
Mavrodius
Top