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,933
Reaction score
13,570
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,933
Reaction score
13,570
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 Posts

Latest Profile Posts

12 done, 4-5 started. Now that the weekend is over, things will sloooowwwww down again proabably.
when you're completely done with someone's crap lol...
Ami
--- Survival For RPGist Part 3 ---

F.Healer: Here it is,I made the Simple Sandwich
Survivalist
: it's so Delicious!
Chef: Here you Go! My Gourmet Steak.
Survivalist: It's Super Delicious,Too!
F.Mage: I Made it for you!
F.Healer: Uhh...Charcoal?
F.Mage No,It's a Toast!
Chef: Did you Let it in 10 Minutes?
F.Mage: Maybe?

Forum statistics

Threads
103,033
Messages
996,814
Members
134,507
Latest member
juegostudios
Top