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,321
Reaction score
2,467
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,321
Reaction score
2,467
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,601
Reaction score
3,663
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,930
Reaction score
2,991
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 Posts

Latest Profile Posts

New sprites & animations for Mint and Beri are coming along!
Guh-Colorbound.gif
ScreenShot_10_5_2022_4_44_8.png
Mad O' Malley... a stick figure that's afraid of it's existence being erased. so they always start battle in an anxious state.
Before, I was drawing all the sprite work, super big and shrinking it down. Which was really time consuming if thing's changed. So instead I'm drawing the characters sketch, and then remaking it with pixel art instead.
Why are job interviews so terrifying. :kaodes:

Forum statistics

Threads
125,801
Messages
1,173,663
Members
164,964
Latest member
oliveleaf
Top