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
19
Reaction score
6
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 Posts

Latest Profile Posts

here's another RPG Maker remake idea: "Plumbers Don't Wear Ties". I'll salute to whomever does this
I won't finish it today, I only will have time to work on that next Saturday, what a shame... :(
I made something for @LittenDev [as he requested]
It's been a weird while. I've been so torn down that even playing video games has been something I avoided. But I shouldn't forget two things. One, I love RPG Maker for a reason. Two, only way to eat an elephant is a bite at a time.

Forum statistics

Threads
111,385
Messages
1,060,718
Members
144,727
Latest member
Criimorh_
Top