Checking if it's currently an actor's turn?

Hello! I'm using HUDMaker for the Battle UI and have so far implemented a few things when it's a party member's turn; a flashing TPB bar, flashing Actor's name, and their name appearing above the command list - just to make it crystal clear to the player at glance at any part of the screen whose turn they're inputting for.

I've got all these additional elements currently appearing under the condition that the Actor's TPB Progress = Actor's TPB Maximum. The unfortunate drawback here is that this can be true when it's not currently that actor's turn. Multiple members can fill their TPB bar simultaneously, which obviously causes issues!

So instead I was perusing the script calls spreadsheet looking for a Custom Code; some condition to check if it's actually an actor's turn (specifically by Party Member ID ideally, i.e. Party Member 1, 2, 3 or 4). But I'm not having any joy, and simply Ctrl+Fing the term "turn" re'turn's quite a... few results - which I've tried to look through but my brain is frying. And now I'm not certain "turn" is the correct terminology in this instance anyway.

Can anyone bring any joy? 🙂

Screenshot 2025-10-16 165935.png
BattleManager.actor()?.actorId() == idyouwanttocheckfor
Thank you for the speed!

I checked the script call description too, and it absolutely looks like what I need, but after entering this:

Code:
BattleManager.actor()?.actorId() == 1

It's just causing those elements to flash at all times, whether it's Party member 1's turn or not. The condition is constantly returning as true.

Screenshot 2025-10-16 173153.png


Have I utilised it improperly?
Delete "true;"
As Solar_Flare said, the "return true" part just returns true before it can process any other code. So it's never actually evaluating what you added.
Ah, I get it! Thank you both - working perfectly now!
Oooh, actually it wasn't quite working. It was calling for Actor IDs specifically, and not referencing actors in a certain party/follower position. So I was getting issues if, for example, Actor 1 wasn't the first party member. I swapped the two characters' formations and they were showing each others' portraits on their turns.

SO in my first ever stroke of javascript luck, I Hail Mary'd this instead.

Code:
return BattleManager.actor()?.actorId() == $gameParty.members()[0].actorId()

and just swapped [0] (the party leader) for [1], [2], and [3] for the followers respectively. This seems to work, if anyone needs this in future!

Original thread: https://forums.rpgmakerweb.com/threads/checking-if-its-currently-an-actors-turn.180580/