Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Leetfaction

Need Help with a "Sandstorm Effect" (RMXP)

Question

Ok, in the project I'm making called "The Seven Stones", I'm making this area called the Alakaza Desert and I wanted to make it so that there is a "sandstorm effect" where you lose about 1-2 health every 5 frames and you instantly get a gameover if your health reaches 0. I've got the Common Event set to a switch and made it a parallel process and it works fine, the only problem I'm having is that the character's health stops dropping when it hits 1 HP, so they won't get a gameover since it won't drop to 0 HP. I had another parallel process event on the map that had a conditional branch saying that if their state is "Knockout" then they get a gameover, but their HP won't go to 0, so I'm kind of stumped here. Is there a way to get around this with events or will I need a script for this?

 

I'm using RPG Maker XP in case that helps. Thanks for anyone's help in advance! :)

 

Edit: Yeah, I probably should of posted this in the RPG Maker XP section... <_<

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

An easy way to cheat this is to use another time check.

 

for instance when player hp == 1

wait: for the same drainage time

call game over.

 

 

just be sure that this is apart of your same coding, or if you separate it, make sure its only active when the sandstorm is active, otherwise if you lose a two way battle, you'll end up having a gameover screen... but im just babying you x.X you got that ish man.

Share this post


Link to post
Share on other sites
  • 0

Cool! I got it to work, thanks Zane!

 

I looked in the Game_Actor script where it says:

 

#--------------------------------------------------------------------------

# * Get Maximum HP

#--------------------------------------------------------------------------

def maxhp

n = [[base_maxhp + @maxhp_plus, 0].max, 9999].min

for i in @states

n *= $data_states.maxhp_rate / 100.0

end

n = [[integer(n), 0].max, 9999].min

return n

end

 

and I changed the HP min to 0 since it was at 1 by default and it fixed the problem, thanks again! :alright: This could probably be used for a poison effect as well.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...