Jump to content
Haze

Regenerate 1% of HP every 2 to 3 seconds

Recommended Posts

I need to know how I can have my players regenerate health in and out of combat, every 2 or 3 seconds. I can't figure out how to do it, just by HP points, not percentages.

Share this post


Link to post
Share on other sites

Well, I'm not sure either how to do it but I'm sure it'll have something to do with scripts.

 

I did find this: http://rmvxace.wikia.com/wiki/Traits

 

And it's an Ex-Parameter you can set...but since I haven't played with THAT particular trait I don't know. XD

 

I also googlied this: http://www.rpgmakervxace.net/topic/20164-changing-how-hp-regeneration-functions/

Share this post


Link to post
Share on other sites

I'm not sure if health regen is treated the same way as mana regen, but I achieved passive mana regen by setting the Ex-parameter MRG to 2% as a class feature. I would THINK it does the same thing with HRG, but I'm not sure.

 

 

post-53178-0-33511800-1425168039_thumb.png

Share this post


Link to post
Share on other sites

I'm not sure if health regen is treated the same way as mana regen, but I achieved passive mana regen by setting the Ex-parameter MRG to 2% as a class feature. I would THINK it does the same thing with HRG, but I'm not sure.

 

Doesn't work :/

Share this post


Link to post
Share on other sites

Well I happen to know that it works during a battle process. But you want something that will act like health regen outside of combat I suppose.

 

How about a Common Event?

 

 

 

POST EDIT:

 

I understand you want the regen to work by %. This could be figured out if the common event idea works for you.

post-53178-0-37602900-1425170061_thumb.png

Edited by StrayBalloon

Share this post


Link to post
Share on other sites

Well I happen to know that it works during a battle process. But you want something that will act like health regen outside of combat I suppose.

 

How about a Common Event?

 

 

 

POST EDIT:

 

I understand you want the regen to work by %. This could be figured out if the common event idea works for you.

 

Common event works fine, I just can't figure out how to turn it into a percentage.

Share this post


Link to post
Share on other sites

I have an idea.  How many characters will be in your games' party?

 

Depends on the instance.

 

Usually just yourself. If you enter a dungeon, 4 others.

Share this post


Link to post
Share on other sites

Will need testing, but I think this *should* do something close to it.  Just have the switch for the common event turn on at the start of the game.

 

post-53440-0-74856300-1425174559_thumb.png

 

 

Edited to fix my error in the event.

Edited by Chareu

Share this post


Link to post
Share on other sites

Will need testing, but I think this *should* do something close to it.  Just have the switch for the common event turn on at the start of the game.

 

attachicon.gifHP_Regen.png

 

 

Edited to fix my error in the event.

 

I see your picture, but in all honesty im not sure how you set it up. Mind explaining?

Share this post


Link to post
Share on other sites

All right.  I had something typed out, but then accidentally closed the page. I'll just make a quicker explanation.  Also, since I had to look at it again, I realized I made a mistake and it would only heal based on his original max hp.  I changed it so it should always heal based on his current max hp.

 

post-53440-0-64192500-1425176924_thumb.png

 

The first thing we need to do is to create a loop and then add what we want to constantly occur within it.

 

The first line you add is a new variable and name it something you can recognize (mine is Eric's HP Regen).  Then we choose game data.

 

post-53440-0-37231200-1425176140_thumb.png

 

Then we set that variable to reflect his max hp (mhp= max hp).

 

post-53440-0-24938100-1425176214_thumb.png

 

Then in line 2, we change that value to 1% of his max hp by dividing the original variable by 100.

 

post-53440-0-76905500-1425176439_thumb.png

 

The wait 120 frames makes it so that it takes 2 seconds for the actions to repeat.  1 second equals 60 frames.

 

Then we add the change HP function to the event and choose to the change it based on a variable.

 

post-53440-0-45448100-1425176728_thumb.png

 

By using our variable we added in the beginning of the loop, it is now telling the event to increase Eric's HP every 2 seconds based on his max hp.  By placing the two parts that change the variable into the loop, it will constantly update the variable to reflect his current max hp.

 

If there is anything I didn't explain enough, feel free to let me know.  Also as I said before, I haven't tested it.

Share this post


Link to post
Share on other sites

All right.  I had something typed out, but then accidentally closed the page. I'll just make a quicker explanation.  Also, since I had to look at it again, I realized I made a mistake and it would only heal based on his original max hp.  I changed it so it should always heal based on his current max hp.

 

attachicon.gifHP_Regen_6.png

 

The first thing we need to do is to create a loop and then add what we want to constantly occur within it.

 

The first line you add is a new variable and name it something you can recognize (mine is Eric's HP Regen).  Then we choose game data.

 

attachicon.gifHP_Regen_1.png

 

Then we set that variable to reflect his max hp (mhp= max hp).

 

attachicon.gifHP_Regen_2.png

 

Then in line 2, we change that value to 1% of his max hp by dividing the original variable by 100.

 

attachicon.gifHP_Regen_3.png

 

The wait 120 frames makes it so that it takes 2 seconds for the actions to repeat.  1 second equals 60 frames.

 

Then we add the change HP function to the event and choose to the change it based on a variable.

 

attachicon.gifHP_Regen_5.png

 

By using our variable we added in the beginning of the loop, it is now telling the event to increase Eric's HP every 2 seconds based on his max hp.  By placing the two parts that change the variable into the loop, it will constantly update the variable to reflect his current max hp.

 

If there is anything I didn't explain enough, feel free to let me know.  Also as I said before, I haven't tested it.

 

That works! Thank you!

 

 

Edit:

 

Although, im trying to use the same theory to work with mana, though it isn't working.

 

 

 

Edit 2:

 

Jk, set them as the same variable by accident. Works fine :) Can be closed as solved.

Edited by Haze

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×