Main Menu

[RM2K/3] Changing Screen Tint Based On HP

Started by Sated, July 19, 2010, 10:01:08 AM

0 Members and 1 Guest are viewing this topic.

Sated

Should work in any RPGMaker.

You're going to need a variable. Call it "Hero HP".
You're going to need another variable. Call it "Hero Max HP".
You also need a switch called "Cutscene" (you'll see why later).

After setting these up, make an event on every map you need this tinting on that is a "Parallel Process" and has the following eventing:

If Switch "Cutscene" is OFF Then
   Change Variable [xxxx: Hero HP] = Hero Current HP.
   Change Variable [xxxx: Hero Max HP] = Hero Max HP
   Change Variable [xxxx: Hero HP] * 100
   Change Variable [xxxx: Hero HP] / [xxxx: Hero Max HP]
   If [xxxx: Hero HP] < X Then
  Tint Screen: Red
   Else
  Tint Screen: Normal
   End
End
Wait 0.0 Sec


After setting this up, remeber that the "Cutscene" switch needs to be turned ON at the start of any cutscene and OFF at the end of it. This will allow you to tint the screen during cutscenes without having this event mess around with it!

If you want the same to happen in battles then this is a simpler proposition. First, in every battle, create a battle-event that is triggered by the Hero's HP being between 0% and X%. It should simply look like this:

Tint Screen: Red

Then make a second battle-event that is triggered by the Hero's HP being between X+1% and 100%. It should look like this:

Tint Screen: Normal

The X value is the value you want the tinting to change below. It should be set to the percentage you want, not a raw value!