I'm messing with party code and for scenario plots, I'm trying to replace one heroes group with another one and here's my approach to my problem:
Firt, define an array of heroes in second group
Second, clear $gameParty._actors and put const secondParty in its place:
While this code works fine, because I see all new heroes in party in all Scenes, the default ones from previous array are not changed on game map. How can I swiftly switch between my defined arrays to make playable parties without a need of using party manager plugins?
I know I can event it, but using script call in my case would be a more efficient way of switching between parties.
Firt, define an array of heroes in second group
Code:
const secondParty = [15, 20, 21,22,23,24]
Second, clear $gameParty._actors and put const secondParty in its place:
Code:
const secondParty = [15,20,21,22,23,24,25]
$gameParty._actors = secondParty
$gameMap.requestRefresh()
$gameParty.refreshMembers()
$gamePlayer.refresh();
While this code works fine, because I see all new heroes in party in all Scenes, the default ones from previous array are not changed on game map. How can I swiftly switch between my defined arrays to make playable parties without a need of using party manager plugins?
I know I can event it, but using script call in my case would be a more efficient way of switching between parties.