Hi,
I went through google searches during almost one hour, it looks like I kinda give up, and I'm seeking help from people that actually understands JS.
First of all, I'm using Yanfly's Battle Engine Core, and SV system. I think it might help you to better locate the answer.
Here's the problem : When you're in a battle screen and you modify the HP through eventing, it doesn't show up on battle screen because it is not considered as an action result, but I can't make it an action, because the damage dealer is a character who is outside the fight. Like people offscreen throwing at you stuff that either damages you or heals you.
Is there a way to manually display the damage popup via script call ? I already figured out the script call to display an animation on the actors in battle.
Thanks,
W
Change Actors HP in battle, and make it noticeable
● ARCHIVED · READ-ONLY
-
-
There's actually an easy way which worked for me:
First: Make an actor for the offscreen character. Give it stats.
Second: In the troop event for the battle, have it do a force action on that actor you just made of the action you want it to do.
Worked for me, as the engine didn't seem to care that the actor the force action was on wasn't in the party. But it could have also been due to the scripts I used in ACE (as I did this in ACE not MV), so if it doesn't work let us know. -
To enter in further details, someone offscreen drops from above a gift box that has chances to be explosive. The players has the choice to open it (or not) and get a 50% chance of getting no damage from the offscreen foe. If the gift box explodes, I want the animation, the damage popup and a laugh occur simultaneously.
That said, I tried your solution but simulating an action by a real offscreen character is effective for box drop stuff, but there's a waiting time before (casting) and after the explosion (because the popup displays after the animation by default) and the laugh occurs seconds after the action
The gift box drop is a Skill that calls a common event, which handles the randomness. So until it's not finished, I can't even intercept it with a Troop event set in "moment"
The easiest way to do this would doing a script call to display the damage popup only -
First you need to do the hp decrease, then you need to refresh the window.
So for example
$gameParty.members()[0]._hp /= 2;
SceneManager._scene._battleStatusWindow.refresh();
In case I got the window wrong, open the console in battle (press f8 or f12) and type in SceneManager._scene... and take a look through it, you should be able to find an attribute there that contains "StatusWindow". -
It didn't work :/ The closest thing to battleStatusWindow is simply statusWindow, but when I refresh it, nothing happens.
-
Bump, any ideas ?