How should I draw Enemies' and Party members' state with HUD Maker or create a new window? #Solved

Sorry for my bad English.
And this is HUD Maker http://sumrndm.site/mz-plugins/

I use HUD Maker (free version) draw a simple battle UI in my game.
Now I only have the status of both sides not completed.

2021-03-12_213923.png


I see it has Code in it.
But I really don't know how to use it.

I only successfully used
  const partymembers = $gameParty.members()[1].name();
  return partymembers;
to draw the name of the members.
But it doesn't work in making the state.
I think it should be done, but my method is wrong...



This is my game screenshot.
1.png


I want it to be like this.
2.png


If I am not mistaken, other places should be done with "this.drawActorIcons(actor, x, y, w);"
Or something like $gameParty.members()[0].state();.
But I just don't know what to do.
And I don't know how to make the status bar to the right...
It seems that no matter if I add "center" or "right", he will only start from the left.

If it cannot make with HUD Maker,
maybe I can create some transparent windows and use "this.drawActorIcons(actor, x, y, w);" to finish?
But how do I make the window display in the battle scene?
I have followed some teachings before, but I failed...





2021.03.22
I solved this problem with the help of a friend.
The method is to enter the following in "Icon Index".

if ($gameParty.members()[隊伍順位] && $gameParty.members()[隊伍順位].allIcons()[持有狀態順位]){
return $gameParty.members()[隊伍順位].allIcons()[持有狀態順位];
} else {
return 0;
}

Original thread: https://forums.rpgmakerweb.com/threads/how-should-i-draw-enemies-and-party-members-state-with-hud-maker-or-create-a-new-window-solved.134339/