RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RM2K/3] Changing Screen Tint Based On HP

0 Members and 1 Guest are viewing this topic.

Level 84
puking up frothing vitriolic sarcastic spittle
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:

Code: [Select]
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
  Tint Screen: Normal
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:

Code: [Select]
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:

Code: [Select]
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!