How to get current active battle member condition ? (hudmaker MZ)

Status
Not open for further replies.

Oxem

Veteran
Veteran
Joined
Sep 30, 2015
Messages
30
Reaction score
8
First Language
French
Primarily Uses
Hi there guys, it's been a few days that im looking for a way to switch some ui elements according to the active battler (currently waiting for input) as other before me tried to do and possibly manage to. I look many threads and tried out many solutions but I finaly found a way with this line of code BattleManager.actor() === $gameParty.members()[x] (inside the hud maker condition).

BUT for some reasons it's not working and I don't understand why. Every pictures (there is 3, one for each party members) show up all at the start of the battle and don't hide when they should. It's a very simple problem and I think im missing something obvious.

I have all the visustella plugins and nothing more. The projet is all new (based on the visustella game project sample).
In fact I have just one extra plugin named CBT_WindowExMZ

Maybe someone will be able to help me. Thanks a lot for your time !
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,313
Reaction score
2,464
First Language
Dutch
Primarily Uses
RMMV
the current turn is for MV at least is: BattleManager.actor().actorId()

so you need to test that with partyMembers

or for saver if the party member is in battle:

$gameActors.actor(ID).isBattleMember() as well.

or it might throw an error.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,313
Reaction score
2,464
First Language
Dutch
Primarily Uses
RMMV
I think it should as they are relitive close so far I know, it might
be slightly different as I cannot really check the files.

there are some people with the same issue that uses MV calls,
you might be able to find than or search for battleMembers
and gameParty member on the scriptcall list, you get quite alot of them.
 

Oxem

Veteran
Veteran
Joined
Sep 30, 2015
Messages
30
Reaction score
8
First Language
French
Primarily Uses
Yes I already did and it's the one that i put in my first message BattleManager.actor() === $gameParty.members()[x] (it's working but just not for me apparently)

But I will continue to look for it thanks anyway !
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,571
Reaction score
3,633
First Language
English
Primarily Uses
RMMV
Can you be more specific? Post a screenshot of what you actually have typed in, because unless x is a variable you've defined someplace, $gameParty.members()[x] doesn't mean anything.
 

Oxem

Veteran
Veteran
Joined
Sep 30, 2015
Messages
30
Reaction score
8
First Language
French
Primarily Uses
Here it is (0 for party member 1 and etc)
 

Attachments

  • HUD_Maker_Ultra_8OxwVt98ji.png
    HUD_Maker_Ultra_8OxwVt98ji.png
    600.5 KB · Views: 5

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,924
Reaction score
2,982
First Language
EN
Primarily Uses
RMMZ

BattleManager.actor() === $gameParty.members()[1] return true;
That is either a syntax error (return is invalid in top-level eval) or will always return true; the first line is irrelevant in both cases.

I'm not sure which format SRD's HUD Maker expects here, so...
  1. If the conditions are evals, remove the return line, i.e. (for member #2):

    BattleManager.actor() === $gameParty.members()[1]

  2. If the conditions are function code, try this instead (for member #2):

    return BattleManager.actor() === $gameParty.members()[1];
 

Oxem

Veteran
Veteran
Joined
Sep 30, 2015
Messages
30
Reaction score
8
First Language
French
Primarily Uses
2. If the conditions are function code, try this instead (for member #2):

return BattleManager.actor() === $gameParty.members()[1];


It's working ! Thank you very much mate
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,945
Reaction score
6,305
First Language
Dutch
Primarily Uses
RMXP

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 Profile Posts

Sometimes I wonder why I still try and recruit others to help with my games. It never works.
ScreenShot_10_3_2022_4_27_17.png
welp, thanks to Luna MV, I was able to add the Balloon as a window... thus allowing me to edit the font color and outline... so now it looks like comic bubbles above characters. I have NO idea why I couldn't get this to work through more conventional means, but here we are.
CUTE CUTE CUTE.gif
I cannot cease doing cute art
War and Wonder is a 100% choice-based open-world visual novel.
1664821313732.png
1664821466359.png
1664821547746.png
Going live soon on Twitch, and will continue Fortunastreet's game "Verloren". For those who are curious, you are welcome to join ;)

-> Franz' Twitch channel

Forum statistics

Threads
125,757
Messages
1,173,262
Members
164,916
Latest member
Syczewski
Top