Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [Eventing]Changing Screen Tint Based On HP, Kinda like in an FPS...
Fallen-Griever
post Jul 17 2010, 04:39 AM
Post #1


Forgotten Neural Kiss
Group Icon

Group: Revolutionary
Posts: 183
Type: Event Designer
RM Skill: Masterful




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
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:

CODE
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
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!


__________________________
<-- Complete
<-- In Development
<-- Complete
Go to the top of the page
 
+Quote Post
   
viridev
post May 27 2012, 04:57 AM
Post #2



Group Icon

Group: Member
Posts: 1
Type: Developer
RM Skill: Intermediate




You could just use a common event script, it would replace the need for adding a new event in every map location. thumbsup.gif
Otherwise great tutorial, it really helped.
Go to the top of the page
 
+Quote Post
   
LaDestitute
post Jun 5 2012, 07:59 PM
Post #3


Level 18
Group Icon

Group: Revolutionary
Posts: 351
Type: Event Designer
RM Skill: Advanced




You can also use varying shades of red (or reddish-orange) to make it more gradual and look better.


__________________________
Current Project: Pozzo (arcade game, tentative title)

The following statement is true: The previous statement is false.

Cool links and shit
YouTube Subscribe Spread
Illumination effect tutorial
Writing good dialog tutorial
Color theory tutorial
Breeze Revolution
Tindy's General Mapping Guidelines
Proper story structure tutorial
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 12:32 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker