RMMV Help | SRD HUDmaker / What Battle command is Hovered/Selected.

STARFALL

Core of the Stars
Veteran
Joined
Jul 6, 2020
Messages
212
Reaction score
54
First Language
spanish
Primarily Uses
RMMV
I need check when the attack comand is hovered/Selected, for that i use this eval:
SceneManager._scene._actorCommandWindow.currentData().symbol=='attack';
When i set this, work fine, but then gave me this error( See below ). How can i do this?

1618695976404.png
 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMZ
I need check when the attack comand is hovered/Selected, for that i use this eval:
SceneManager._scene._actorCommandWindow.currentData().symbol=='attack';
When i set this, work fine, but then gave me this error( See below ). How can i do this?

View attachment 186463
can you provide what the console says by pressing F12
This may be caused by SceneManager._scene._actorCommandWindow.currentData() returning undefined when the battle starts and then its looking for undefined.symbol causing a type error.
For a quick fix you could do is wrap you're code in the if statement bellow
Code:
if(SceneManager._scene._actorCommandWindow.currentData() != undefined){
}
 
Last edited:

STARFALL

Core of the Stars
Veteran
Joined
Jul 6, 2020
Messages
212
Reaction score
54
First Language
spanish
Primarily Uses
RMMV
Was perfect, this is the final eval:

BattleManager.actor() && SceneManager._scene._enemyWindow.active != true && SceneManager._scene._actorCommandWindow.currentData() != undefined && SceneManager._scene._actorCommandWindow.currentData().symbol==='attack';

That show the HUD piece when the command Attack is hovered/Active only when actors is in setting commands phase.
 

Latest Threads

Latest Profile Posts

my main character isn't the warrior of light or the chosen one, he's a self righteous, invasive try hard who gets ahead of himself and makes a critical error, resulting in a downward moral spiral that, eventually, leads him to truths that make him a better man, and im DAMN proud of that.
Generate Actors, Dark Fantasy Monsters, & I Heard There Was a Chosen One, | RPG Maker News #42

Work on Cat Quest: The Last Catmancer continues slowly but surely. :kaopride: Today I received the Game Over screen from @Finnuval!
GameOver.png
Hey everyone! No Studio Blue RPG Maker Critiques Stream today! But you can always check the playlist for old streams you've missed!

Forum statistics

Threads
111,445
Messages
1,061,150
Members
144,806
Latest member
HowlingMeteor277
Top