Swap Characters for Battle Event

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
I have a "battle event" where i need to "remove" all party members before the battle and have one take they`re place in that battle and have them be returned to the party after said battle. Is there a easy way of doing this?
I cant use Change party member and add/remove the party members because you can pick your Character at the start of the game and there is no telling which Party members you already found at that point either.

Im pretty sure it can be done via script call just not sure where to find them and which to use
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
Code:
Script: this._savedActors = $gameParty._actors.clone()
        $gameParty._actors = []
Change Party Members (add your solo actor)
Battle Processing
Script: $gameParty._actors = this._savedActors.clone()
 

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
Thanks a ton @Shaz :D
Cant test right now, but just so i got this right.
$gameParty._actors.clone() <-- this is where i put the actor ID`s
$gameParty._actors = [] <-- here i put a variable
and this part
Script: $gameParty._actors = this._savedActors.clone() <-- is where i again add the ID's

Am i correct?
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
No, you put it exactly as I put it.

The Change Party Members event command is where you put the actor's id.
 

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
Ah okay. Thanks!

Edit: So it is working, it swaps my party members with my set actor and replaces them after the battle
but.. they are invisible until i switch to a different map.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Hello folks, I'm an old member deciding to reenter the forum. Greetings :D
When a parent (of a less than adult aged child) is like
"Oh, I'm like a friend to my child. We're friends."
I'm like
"Oh, that kid's gonna suck...."
Baby tiger gets a belly rub! ^.^
Ami
--- Friendship System ---

(F.Mage and F.Healer's FP is 100)
F.Mage: We did it! we can beat the monster easily!
F.Healer: With the Friendship System,we got stronger thanks to you F.Mage (Hugging)
F.Mage: (Blushing) Ahh...don't say like that. we are Best Friend Forever.
(In Distand)
M.Mage: They look happy...
M.Healer: Yeah...always like that...

Forum statistics

Threads
103,284
Messages
998,586
Members
134,793
Latest member
Vonerd
Top