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
7,249
Reaction score
2,871
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
7,249
Reaction score
2,871
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
7,695
Reaction score
5,448
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: 7

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,503
Reaction score
3,543
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
10,111
Reaction score
6,398
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

I love this job (as a programmer), coding is fun sometimes. It is just the deadline that needs to CHILL.
Best explanation of "Confirmation Bias": "If you go looking for a fight, you will always find one". If you always look for something, you'll find it. Negativity or Positivity. This is just a reminder to spend time looking for some Positivity today. :D Ya'll have earned it and deserve it.
And now all my attacking skills suddenly heal instead of doing damage...Even kills and revives. Because ofc they do xD
Spend more time building up what you like, and stop tearing down things you don't. If you only tear stuff down, nobody will get to enjoy anything.

Forum statistics

Threads
129,931
Messages
1,206,358
Members
171,131
Latest member
Maki_404
Top