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,289
Reaction score
2,461
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,289
Reaction score
2,461
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,459
Reaction score
3,536
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,902
Reaction score
2,963
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,943
Reaction score
6,304
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


Clarn Hold
(No storylines)
There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​
ScreenShot_9_24_2022_7_56_24.png
New area being started today. It leads to one of the games 2 optional bosses.

Forum statistics

Threads
125,540
Messages
1,171,816
Members
164,613
Latest member
dulichvungtaudl3m
Top