- 1
- Posts
- 6
- Years
- Seen Jan 22, 2022
So I'm fairly poor at this it would seem.
At the moment the version of essentials I'm working from did not trigger a sound when a Pokemon gets below 25% HP.
I did some digging and some research, but didn't get to where I wanted to be. I was looking through PokeBattle_ActualScene, and saw this:
and was trying to utilize this in tandem with pbSEPlay("[NameHere]"). Taking into consideration it only plays when HP crosses that threshold, i.e. when the current HP is above 25% and the new HP is below 25%. I tried playing around with the variables @currenthp, @endhp newhp, oldhp. However I can't figure out a way to reference current HP and end HP to the battler's total HP.
In short this should be fairly simple, but I'm a simple person and can't figure out how exactly to get this to work the way it should. Any help would be appreciated, thanks!
At the moment the version of essentials I'm working from did not trigger a sound when a Pokemon gets below 25% HP.
I did some digging and some research, but didn't get to where I wanted to be. I was looking through PokeBattle_ActualScene, and saw this:
- hpzone=2 if self.hp<=(@battler.totalhp/4).floor
and was trying to utilize this in tandem with pbSEPlay("[NameHere]"). Taking into consideration it only plays when HP crosses that threshold, i.e. when the current HP is above 25% and the new HP is below 25%. I tried playing around with the variables @currenthp, @endhp newhp, oldhp. However I can't figure out a way to reference current HP and end HP to the battler's total HP.
In short this should be fairly simple, but I'm a simple person and can't figure out how exactly to get this to work the way it should. Any help would be appreciated, thanks!