Status
Not open for further replies.

Chocco

Villager
Member
Joined
May 3, 2022
Messages
5
Reaction score
4
First Language
French
Primarily Uses
RMMZ
Hello there!

I'm currently trying to make a switch system that allows the player to switch active members during battles.
It's working fine using $gameParty.swapOrder(), but the UI doesn't update after the switch.

What I mean is if i'm using heroes 1-4 at the beginning of the fight, and switch hero 1 with 5, hero 5 visually joins battle and is able to act, but the four displayed hero at the bottom of the screen (UI) remain heroes 1-4.

Is there any script call that can refresh the UI ?

Thank you for your time.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,808
Reaction score
2,868
First Language
EN
Primarily Uses
RMMZ
Maybe try this?

SceneManager._scene._statusWindow.preparePartyRefresh();
 

Chocco

Villager
Member
Joined
May 3, 2022
Messages
5
Reaction score
4
First Language
French
Primarily Uses
RMMZ
Working like a charm, thank you !

Is there anywhere else to look than this gdoc when looking for scripts ?
I browsed over it but this command is nowhere to be found.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,808
Reaction score
2,868
First Language
EN
Primarily Uses
RMMZ
I'm not sure, sorry. I did just add it to that sheet, though, as "Refresh Battle Status". :kaohi:

In case it helps, I got that script call by looking through the core scripts:
  • SceneManager._scene gets the current scene (rpg_managers.js);
  • ._statusWindow gets the status window defined on Scene_Battle (rpg_scenes.js);
  • .preparePartyRefresh() is a Window_BattleStatus method that loads all relevant face graphics then refreshes the window (rpg_windows.js).
 

Chocco

Villager
Member
Joined
May 3, 2022
Messages
5
Reaction score
4
First Language
French
Primarily Uses
RMMZ
Alright, that's all I needed.

Thank you again, you can close this post.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,808
Reaction score
2,868
First Language
EN
Primarily Uses
RMMZ
You're welcome!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Just laid down a sick nasty new post in the MagiCats! Infinite Sadness thread! Lemme give ya a big ol' hug for it.

bg6.jpg
Wheel of Attacks.png

MORE GAMBLING THEMED ATTACKS!

I AM UNABLE TO STOP!
Is it ok to repost stuff that i've posted to threads in the status feed?
If so, here's art of Shiloh, the main protagonist of the game i'm making:20220807_181702.jpg
They are meant to be ambiguous in gender, like Frisk from Undertale or Gogo from FFVI. I haven't decided what their age will be yet. Any ideas?
Please comment what you think about the art and design!
ScreenShot_8_10_2022_7_15_21.png
Looks like Mike's got a new party member in Robbi...

Calf survival story with a happy ending.

Forum statistics

Threads
124,461
Messages
1,163,837
Members
163,282
Latest member
Wintt
Top