Main Menu
  • Welcome to The RPG Maker Resource Kit.

Need Help With Battle Events

Started by DrHojo, May 03, 2007, 10:16:16 PM

0 Members and 1 Guest are viewing this topic.

DrHojo

i am confusd by the way it is set i am trying to make something like say i want my hero to get fully healed in the party then the music changes till my health gose below 20% Can somebody help me please  :'( :Edit: Its allright i got it working now :Edit:

:)

?_?

well to do anything with hp below 20% do this:

Set varible 1 to actor's hp
Set varible 2 to actor's max hp

Control varible 2 * 20 (times 20)
Control varible 2 / 100 (diided by 100)

then condtiontional branch varible 1 is equal to or less then variable 2
Watch out for: HaloOfTheSun

modern algebra

#2
I am confused by the question.

From what I understand, you want different music for when your health is below 20%?

The trouble you are having is that if the hero is healed from below 20%, the music doesn't change back to regular?

Well, I'm not sure, but I think the easiest way would be to have two variables calculate what percent health you are at. This can easily be done by setting one variable to equal your current HP (found in Control Variables -> Actor -> HP) and one set to your max HP (found in Control Variables -> Actor -> maxHP) and then multiply the variable containing current HP by 100 and dividing it by the variable which contains your max HP. This will come up with the percentage of health you have left. Then, you can condition the change Battle BGM on that. So, the event would look like this:

Control Variables: [XXX: % HP] = actor [YYY: <Hero>]'s HP
Control Variables: [ZZZ: max HP] = actor [YYY: <Hero>]'s maxHP
Control Variables: [XXX: % HP] * 100
Control Variables: [XXX: % HP] / Variable [ZZZ:max HP]
Conditional Branch: [XXX: % HP] <= 20
     Change Battle BGM: [Critical Health]
Else
     Change Battle BGM: [Normal Health]
Branch END


I think that should work, but there might be a way built into the battle events database, I'm not sure.

If it doesn't work, post back.

EDIT:

Stop your posting before me, Nouman  ;8