Health regen on getting hit

● ARCHIVED · READ-ONLY
Started by raoniluna 8 posts View original ↗
  1. I wanted a script (or something else, but I'm guessing it needs to be a script) for when I have a specific item equiped every time the character gets damaged (any kind of damage) it recovers Health with the formula [(LUK) + (4% of Max HP)]
    Yeah, I know, very specific, but I hope someone helps since it seems simple enough for those who know what to do
    Thanks <3
  2. Luck is typically an Attribute with a constant value (like Attack Defense etc). It's usually not something that gets damaged and healed like HP, MP or TP. You might need to go into further detail about how your game works functionally because what you're asking for doesn't make a lot of sense just yet. From what you described, you want someone's LUK stat to increase through the roof as the character takes damage throughout the game.
  3. Frogboy said:
    Luck is typically an Attribute with a constant value (like Attack Defense etc). It's usually not something that gets damaged and healed like HP, MP or TP. You might need to go into further detail about how your game works functionally because what you're asking for doesn't make a lot of sense just yet. From what you described, you want someone's LUK stat to increase through the roof as the character takes damage throughout the game.
    You misunderstood it, it recovers HEALTH based on luk and max hp, I edited it to make it more understandable
  4. Frogboy said:
    It's usually not something that gets damaged and healed like HP, MP or TP.

    but you could tap into those regeneration functions, and hook up your own, where you test for that item.
  5. You can do it with passive states as far as i know but the Lunatic Mode for it is something i'd need to research to post here.
  6. You can do it with these two YEPs:
    - Buffs & State Core
    - Auto Passive States
    Create a state with this note tags, do not give it any icon:
    Code:
    <Custom Respond Effect>
    var heal = target.luk + Math.round(target.mhp * 0.04);
    target.gainHp(heal);
    target.startDamagePopup();
    </Custom Respond Effect>
    Give your equipment this state via note tag
    Code:
    <Passive State: x>
    where x is the ID of the state above.
  7. JamesRyan said:
    You can do it with these two YEPs:
    - Buffs & State Core
    - Auto Passive States
    Create a state with this note tags, do not give it any icon:
    Code:
    <Custom Respond Effect>
    var heal = target.luk + Math.round(target.mhp * 0.04);
    target.gainHp(heal);
    target.startDamagePopup();
    </Custom Respond Effect>
    Give your equipment this state via note tag
    Code:
    <Passive State: x>
    where x is the ID of the state above.
    Thanks, I will try that!
  8. JamesRyan said:
    You can do it with these two YEPs:
    - Buffs & State Core
    - Auto Passive States
    Create a state with this note tags, do not give it any icon:
    Code:
    <Custom Respond Effect>
    var heal = target.luk + Math.round(target.mhp * 0.04);
    target.gainHp(heal);
    target.startDamagePopup();
    </Custom Respond Effect>
    Give your equipment this state via note tag
    Code:
    <Passive State: x>
    where x is the ID of the state above.

    I had to move this line "target.startDamagePopup();" above "var heal = target.luk + Math.round(target.mhp * 0.04);" to work perfectly cause instead of showing damage and heal it was showing heal twice. But other than that, it is perfect, thank you so much! Really <3