[XP] Actor Critical HP Alert

Started by poxy, July 20, 2010, 10:59:37 pm

Previous topic - Next topic

poxy

July 20, 2010, 10:59:37 pm Last Edit: July 21, 2010, 05:27:24 pm by poxysmash
Actor Critical HP Alert
Version: 1.00
Type: Basic Audio Feedback



Introduction

This will play a warning sound or show a warning image if the actor is near death, based on percent. This should only be used in a one man game, or use the Blizz ABS version for the lead actor.


Features


  • Simple; Plug & Play
  • Can turn off during scenes



Screenshots
Spoiler: ShowHide





Demo

Not necessary.


Instructions

1. Make a common event like so:
Spoiler: ShowHide

Where 'Tycho' is replaced by your actor's name, and 15 is the percent HP threshold that will activate the sound.
1b. For Blizz ABS you can replace the first three commands with
Spoiler: ShowHide
@HPperc = 
$game_party.actors[0].hp * 100 /
$game_party.actors[0].maxhp
$game_variables[8] = @HPperc

This will play the critical sound for the actor you are controlling.
1c. Optionally you can show also show an image, or flash the screen or actor.
Example:
Spoiler: ShowHide

You can use these images: Full screen:
Spoiler: ShowHide

Spoiler: ShowHide

Discrete (for 1c example):
Spoiler: ShowHide

2. At the start of the game, Enable the "game start" switch.
3. To disable the sound, turn the switch "Scene?" off.



Credits and Thanks

WhiteRose and game_guy for suggestions.
My Project: ShowHide

G_G

Actually it'd probably be best to use script calls for setting game variables to the actors hp. Even if its not an abs. You could be coming right out of battle not remembering if you had low hp.

You could also add stuff. Flashing screen, tint screen to red. Etc. Though nice idea ^_^

WhiteRose

One effect that might contribute to this and make it a little more visually appealing would be if you tinted the edges of the screen red when health is low. This could be easily accomplished using the 'Show Picture,' command, I believe.

poxy

July 21, 2010, 02:34:47 pm #3 Last Edit: July 21, 2010, 02:36:01 pm by poxysmash
Quote from: game_guy on July 20, 2010, 11:26:56 pm
Actually it'd probably be best to use script calls for setting game variables to the actors hp. Even if its not an abs. You could be coming right out of battle not remembering if you had low hp.

You could also add stuff. Flashing screen, tint screen to red. Etc. Though nice idea ^_^


Not too good at scripting :p, though I imagine a script like this would not be hard to make. I thought about making the player flash, I'll add those options in. And edit it some. Thanks for the feedback.

Quote from: WhiteRose on July 21, 2010, 01:06:43 am
One effect that might contribute to this and make it a little more visually appealing would be if you tinted the edges of the screen red when health is low. This could be easily accomplished using the 'Show Picture,' command, I believe.


That's a good idea. I will work on a graphic and add it in, thanks.
My Project: ShowHide

SBR*

Quote from: poxysmash on July 20, 2010, 10:59:37 pm
Spoiler: ShowHide
@HPperc = 
$game_party.actors[0].hp * 100 /
$game_party.actors[0].maxhp
$game_variables[8] = @HPperc



When working in script call event commands, you don't need to make the variables class variables. I don't think that even matters? Or, even shorter:
$game_variables[ID] =
$game_party.actors[0].hp * 100 /
$game_party.actors[0].maxhp

Where ID is the game variable ID.

This doesn't really matter, but I just thought I'd say it :P. But it's better to use this than
Spoiler: ShowHide
@>Game variable[0] = [ACTOR]'s HP
@>Game variable[0] *= 100
@>Game variable[0] /= [ACTOR]'s MaxHP


Since with the event way, you always take a certain actor, and with the script call way, you always take the first party member.

One last tip: even shorter would be doing it in a conditional branch:
Spoiler: ShowHide
@>Conditional branch: Script: $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp <= NUM


Where NUM is the hp where the alert begins.

I really like this, and will probably implement this in my game. I've never really thought of this :D. But I've already leveled you up today...

poxy

Quote from: SBR* on July 22, 2010, 04:56:43 am

When working in script call event commands, you don't need to make the variables class variables. I don't think that even matters? Or, even shorter:
$game_variables[ID] =
$game_party.actors[0].hp * 100 /
$game_party.actors[0].maxhp

Where ID is the game variable ID.


That's how I set it up also, but I kept getting a script crash error this way. So I stuck that variable in to get it working..

Quote from: SBR* on July 22, 2010, 04:56:43 am
One last tip: even shorter would be doing it in a conditional branch:
Spoiler: ShowHide
@>Conditional branch: Script: $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp <= NUM


Where NUM is the hp where the alert begins.


That does work well, but I don't really feel like changing it anymore :P

Glad you like it. :)
My Project: ShowHide

SBR*

Quote from: poxysmash on July 22, 2010, 02:49:08 pm
Quote from: SBR* on July 22, 2010, 04:56:43 am

When working in script call event commands, you don't need to make the variables class variables. I don't think that even matters? Or, even shorter:
$game_variables[ID] =
$game_party.actors[0].hp * 100 /
$game_party.actors[0].maxhp

Where ID is the game variable ID.


That's how I set it up also, but I kept getting a script crash error this way. So I stuck that variable in to get it working..

Quote from: SBR* on July 22, 2010, 04:56:43 am
One last tip: even shorter would be doing it in a conditional branch:
Spoiler: ShowHide
@>Conditional branch: Script: $game_party.actors[0].hp * 100 / $game_party.actors[0].maxhp <= NUM


Where NUM is the hp where the alert begins.


That does work well, but I don't really feel like changing it anymore :P

Glad you like it. :)


What is that error?

poxy

Weird, I can't reproduce the error. It was just a non descriptive "Script Error"..
My Project: ShowHide