MZ Scripts to trigger Actor Commands (HUD Maker Ultra)

Afternoon all,

I'm trying to build out some buttons in HUD Maker Ultra and wanted to know if (and if yes, how) there is a script call that
triggers Battle Commands?

Specifically, I'm looking to illicit the same results as the commands in the setHandler for createActorWindow:
commandWindow.setHandler("attack", this.commandAttack.bind(this)); commandWindow.setHandler("skill", this.commandSkill.bind(this)); commandWindow.setHandler("guard", this.commandGuard.bind(this)); commandWindow.setHandler("item", this.commandItem.bind(this)); commandWindow.setHandler("cancel", this.commandCancel.bind(this));


But add it to code in HUD Maker Ultra to use with buttons:

1704313193508.png


I know that Attack and Guard I can just trigger the skill ID directly. The problem there occurs if the actors Attack Skill is updated through a trait. So I'd rather it be the actual command itself.


Escape obviously isn't an actual skill on its own but a party command. So I need to be able to call that directly
SOLVED.

This can be done using the following for anyone that comes by this:

SceneManager?._scene?.commandAttack(); SceneManager?._scene?.commandGuard(); SceneManager?._scene?.commandEscape();


Happy Game Making
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/scripts-to-trigger-actor-commands-hud-maker-ultra.164433/