Need javascript knowledge

Hi,

Currently on my new project in MV, I am working with SRD Hudmaker.
Awesome plugin, but I want to make a square rotate behind the actor's picture, when it's his or her turn.
I have got the square, i have the actors, I have the turning, now I only need the comdition.
The square rotates, when it's the player's turn to choose his/her action.
After that, the square dissapears and goes to the next actor.
I hope you guys understand what I mean.

I'll need a command kinda like: ${$gameParty.leader().turn} or something...
to make the condition true.
I'd add it into Sprite_Actor.prototype.stepForward() and stepBack.
you might need around this (this is a cycle one) but you need to speciafy the ID
to rotate it by than: BattleManager.actor().actorId()

I've moved this thread to Learning Javascript. Thank you.

Hi guys,

I tried to input both, but without succes.
I looked it up in Ace, the moment where it should appear:
start_actor_command_selection
It's at this moment, I don't know the javascript for it.
And as Shadowdragon said: it has to be for actor 1,2,3 and 4 seperately.

Here is a screenshot:
moment.png
You can make the condition by the actor selected and their index in the party and not have to use every single actor ID in your database, but you have to make a separate element for each individual slot in your battle party. I don't know the code for the actor select either, but maybe this bit of info will help narrow it down for someone who does.
You can make the condition by the actor selected and their index in the party, but you have to make a separate element for each individual slot in your battle party. I don't know the code for the actor select either, but maybe this bit of info will help narrow it down for someone who does.
Yes, and what's the condition code?
For the index part:
$gameParty.battleMembers()[index]

Where index is 0-3 or higher if you have more than 4 actors in battle. But for this to work there needs to be something appended to it to show that the indexed actor is selected or ready to be given a command
this thread/post also might be of interest regarding the condition, here the wish was to make a picture only appear when basically nothing is happening (like an attack or something -> "action"), and i think some parts could be adaptable / usable for your case?
For the index part:
$gameParty.battleMembers()[index]
I have entered this into the condition, and now, it stays spinning, so my guess is that this
only reads if the character exists, and doesn't stop if it's not his/her turn to input a command.
Thanks for effort, atleast. 👍

Beckx:​

this thread/post also might be of interest regarding the condition, here the wish was to make a picture only appear when basically nothing is happening (like an attack or something -> "action"), but maybe some parts could be adaptable / usable for your case?
I have tried this, but it shows when the character performs a skill like attack, not when the choice
needs to be made.

I guess this will maybe be a shot too far and unattainable at the current time.
Try this:
JavaScript:
BattleManager._phase === 'input' && BattleManager._actorIndex === 0
I think this should be true iff the first party member (leader, index 0) is currently inputting. Replace the 0 with 1, 2, etc for the other members~
I have tried this, but it shows when the character performs a skill like attack, not when the choice
needs to be made.
ah, shoot. well, i haven't played around with the plugin yet, though i plan to, which is why i've bookmarked the other thread 🙂
I thought maybe you'd get what you want if you negate the other condition, so that you have the opposite effect of what it's currently doing.

though it seems that there is a special 'input' phase, which probably is a safer check than "not action"
Currently at my work, so I can't check, but I will when I get home. Got a good feeling about the last one, with the input rule.


BattleManager._phase === 'input' && BattleManager._actorIndex === 0

It works 🙂 !!!!!! Yaaaaay. Thank you. /bow

Original thread: https://forums.rpgmakerweb.com/threads/need-javascript-knowledge.135676/