Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to make a skill take off a certain % of current hp

I know how to make a skill that damages a percentage of the characters max hp but I don't know how to damage their current hp.

For example, if a character had 1000/9999 hp and I used a skill that damages 50%, I want it to damage the current hp by 50% so it makes it 500/9999.

The script for damaging percent of max hp is this:
for i in $game_party.actors
i.hp = i.maxhp/2
end


Also can someone tell me how to change the damage limit cap from 99,999 to 9999?
 
There's a "damage limit cap?" (looking for it in the scripts...)

By my calculation, the max damage for a skill would be...

8,825,560

That's if the user's stats are maxed out, and the target has no defense, with an element efficiency of 200% & a variance of 100%
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top