Hey all, I want to have an event where I want everybody in the party is removed, making the party empty, regardless of who they are. Having the event command just say "remove party member x" over and over again gets really inefficient when you have a ton of actors in your game. Is there a script for this? I googled for it and got results for VX Ace, but not MV.
Remove all party members?
● ARCHIVED · READ-ONLY
-
-
$gameParty._members = []; Maybe you will have to empty $gameParty._battleMembers like that too.
-
I believe it's $gameParty._actors
Though I feel like there could be some side-effects of having a completely empty party... -
You can do it, but the games gonna end up crashing, if you do.
-
$gameParty._members = []; Maybe you will have to empty $gameParty._battleMembers like that too.
Hmm. So I would just put that in the script event to make it work, right?
I believe it's $gameParty._actors
Though I feel like there could be some side-effects of having a completely empty party...
You can do it, but the games gonna end up crashing, if you do.
Hearing both of you guys, I have this idea that I'll run this script, but then immediately run the "Add Party Member" script to add a party member with no data in it to make it appear that no one is there. Would that work? -
Create a common event which runs remove party x for every party member you can ever have. That way you only create it once.
-
What do you need an empty party for? Because having 0 actors will probably end up crashing since by logic you wont have a player character to move or interact either, even if you add an invisible actor the pause menu will show an empty character bust/face/sprite but it will still have stats and hp/mp bars, you're trying to make a "party split up" kind of event?
-
Hearing both of you guys, I have this idea that I'll run this script, but then immediately run the "Add Party Member" script to add a party member with no data in it to make it appear that no one is there. Would that work?
There's only one way to find out, right? (by testing ;))
You can also run something like this which removes all actors except for one. Replace X with the actor ID # that you want to keep. Note this syntax is for MV 1.6+.
Code:$gameParty._actors = $gameParty._actors.filter(actor => actor.actorId() === X); $gamePlayer.refresh(); $gameMap.requestRefresh();