Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Filled] Actor HP Ammount Screen Tone Changer

I have been looking for this for a while now, so I am going to request it. I am looking for a script like in Dark Messiah when your health is really low, like your about to die soon low, it will change your screen tone colour to a blood red colour. But once you get your health up again past a certain percentage (say 5%) it will change your screen tone back to default. ex. you have 5% HP and your screentone will change and once you get up again higher than 5% it will change back. This would be great if someone could find this, thanks...
 
Don't hurt me if I say this :dead: but you can easily do this with eventing.

For example, a parallel processing that checks if the player's HP is less than 5%. If so, change screen color tone to blood red; else, change screen color tone back to normal.
 
Hey, but if I switch maps won't this event disable  :dead:? Also won't it the screentone change be timed...?

Edit: Wait, I just realized if I were to build this with switches and parallel activation it should work, no map changing, and as conditional I can have it change back :D!
 
Alright, i've got it all down so far with events :grin:, but i'm stuck at one part. I am stuck at the part where I set it to activate when party member 1 is below 5% HP. Could someone tell me which conditional branch activator I would use to do this?
 
Hey if someone could help me here I need a script framework for a script that will active a switch when actors 1-8 are below 5% HP, I mean this to work like a normal screentone change on the map and stuff, I have an ABS... and also I need the screentone only to wear-off when you go back above 5% HP.
 
Um I PMed you something. You can easily change the code in there to turn a switch on instead of changing the color tone.

Also, next time don't quadruple post :crazy: Just edit the first one using the "modify" button.
 
Code:
module ActorHpToneChange
  Change_Percent = 5
  Target_Tone = Tone.new(200, 50, 50)
end

class Game_Actor
  def hp_percent
    return Integer((self.hp / self.maxhp.to_f) * 100)
  end
end

class Game_Screen
  alias_method :seph_actorhpscreentone_gmscrn_update, :update
  def update
    if @tone_duration == 0
      if $game_party.actors[0].hp_percent <= ActorHpToneChange::Change_Percent
        start_tone_change(ActorHpToneChange::Target_Tone, 80)
      else
        start_tone_change(Tone.new(0, 0, 0), 80)
      end
    end
    seph_actorhpscreentone_gmscrn_update
  end
end

Haven't tried it yet, so let me know.
 
Hey Seph, just asking because i'm going to have character classes from actors 1-14. Also I'm having rescuing quests in my game. Which will add them to the party. So I need this only to change the screentone for actors 1-14 or the first party member. Could you help me do this, please?

EDIT: Never mind I don't need that...
 
Alright, thanks seph. You know last night I was hoping that you would reply with a script... It wasn't just a good thought it was a vision, lol. It works perfect, and again thanks seph  :thumb:.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top