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.

Help with Regen...

So I've been trying to make this skill Regen. You know where you cast it and your character constantly replenishes hp while the battle still goes on. I currently have it set up as such:
Created a regen state.
Created a regen skill that inflicts regen state and calls a common event.
Common event says Conditional branch: [Aluxes] is [regen] inflicted.
                                                      Change HP [Aluxes], +5
                                                      Wait 20 frames
                                                      Change HP [Aluxes], +5
and it continues alternating between change hp and wait.
The problem is is that when this happens the battle stops until the common event runs out. I want it so that the battle still takes place while regenerating hp. I've tried everything I can think of. Is this not possible? Do I have to event it a different way? Any help is greatly appreciated.
 
first of all, you have one HUGE (two even, the one you mentioned) glaring problem with this system that i can see: your character can just sit there and gain HP while not fighting. assuming your using a turn based battle system.

the easiest way to do with is via script. its possible to do it with events (ive done it with a "auto-life" effect), but it often makes your battles laggy and even freeze PLUS youd have to have a page of events in each troop of enemies to have the correct effect (i could be wrong on that though). i eventually switched over to using a script for my auto-life effect, because it was cuasing the above problems.

i think i may know of where a regen script was located, ill see if i can find it. try looking around yourself, i think maybe Sandgolem or Fomar might be your best bet.

Edit: i looked through sangolem and fomars stuff, didnt see it. Heres how you would do it via events though. i would persoanlly go with a script if you can find it.

credit to Dragonknight at <http://xrpg2.clicdev.com/f/?CDCookie=xrpg2&showtopic=1710>

Skill: Regen
Inflicts: Regen
Calls: Common Event "Regen"

Common Event: Regen
<>Wait: 15 frames
<>Switch: [????: Regen] = On

Monster Group:
Trigger: Switch [????: Regen] is On
Frequency: Turn
<>Conditional Branch: Hero [Arshes] [Regen] status
<>Variable: [????: RegenArshes] = [Arshes]MaxHP
<>Variable: [????: RegenArshes] /= 125
<>Change HP: [Arshes], + Variable: [????: RegenArshes]
<>
: End
<>Conditional Branch: Hero [Basil] [Regen] status
<>Variable: [????: RegenBasil] = [Basil]MaxHP
<>Variable: [????: RegenBasil] /= 125
<>Change HP: [Basil], + Variable: [????: RegenBasil]
<>
: End
<>Conditional Branch: Hero [Gloria] [Regen] status
<>Variable: [????: RegenGloria] = [Gloria]MaxHP
<>Variable: [????: RegenGloria] /= 125
<>Change HP: [Gloria], + Variable: [????: RegenGloria]
<>
: End
<>Conditional Branch: Hero [Hilda] [Regen] status
<>Variable: [????: RegenHilda] = [Hilda]MaxHP
<>Variable: [????: RegenHilda] /= 125
<>Change HP: [Hilda], + Variable: [????: RegenHilda]
<>
: End
 
Wow, you sir, are a genius. Any way to do it based on healing every number of seconds/frames instead of when the character takes action? Or do I need that script? I'm not gonna be greedy as this is great too. Thank you!
 
errrr... no. like i said, im assuming youre using a turn base battle system? thats brings up a problem: when its your turn for selecting whether you fight/skills/defend/etc. all you have to do is leave your game idle while you heal, because your frame rate/seconds continue going even though youre not actively fighting. therefore you need it to be measured via turn.
 

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