SpakTheComposer

Possibly a glitch in the system
Veteran
Joined
Dec 5, 2016
Messages
84
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hi,
As the title suggests I need some assistance with script calls. There's 2 I'm hoping to achieve.
I'm using these as conditions to trigger objects in SRD's HUDMaker plugin.

1. I'm looking for a script call that checks if both a party member's HP is less than or equal to a certain percentage (let's say 10% I haven't decided what the best value would be yet).

2. Not sure if this is a thing or not, but I'm also looking for a script call that checks if the party is currently selecting skills, attacks, items, etc, and by extension if there is a way to check if a certain party member is selecting there skills (not super important if not possible but would be useful).

Thanks,
Spak
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,159
Reaction score
630
First Language
English
Primarily Uses
RMMV
1. actor.hpRate() returns the percentage of health as a decimal.

2. This is a little more complex, you would check what the current scene or window is. The best way to do it depends a bit on what you're trying to do.
 

SpakTheComposer

Possibly a glitch in the system
Veteran
Joined
Dec 5, 2016
Messages
84
Reaction score
4
First Language
English
Primarily Uses
RMMV
1. actor.hpRate() returns the percentage of health as a decimal.

2. This is a little more complex, you would check what the current scene or window is. The best way to do it depends a bit on what you're trying to do.
What is the script call for number 2 in this case? I found one online for scenes that is:

Code:
SceneManager._scene instanceof Scene_Menu

In my case, I assume I would change the Scene_Menu part to Window_ActorCommand, but I don't know what to change the rest of the code to.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
649
Reaction score
362
First Language
English
Primarily Uses
RMMV
Assuming you aren't using a Plugin that has changed the default methods, BattleManager.isInputting() will return true if you're in the process of selecting menu commands.

If you aren't on the fight/escape menu and an actor is active, you should also be able to use BattleManager.actor() to get the current actor. You could then use something like BattleManager.actor()._actorId or BattleManager.actor()._name.
 

Latest Threads

Latest Posts

Latest Profile Posts

Working on a slightly experimental horror game. It will be finished in approximately 88888888888 years.
Y'all will enjoy it though, I put lots of effort into making it stand out.

It's called Red Light and it's inspired by another obscure RPG Maker horror game, but I don't want to give too much away just yet.
Ohh man, Weapon animations plugin feels so mandatory. Seeing that same image regardless of the icon of the weapon....ugh :p
Ok so......Maaaaybe I've taken a ''little'' bit of inspiration from FF9 when it comes to battle hud xD

ff9.PNG

Just maybe....
New version of my wife's art for Tundra's opening map. No new version of Katrina yet, but I think this looks awesome.1624062754755.png

Forum statistics

Threads
112,354
Messages
1,067,706
Members
146,002
Latest member
Raytoly
Top