Chaos Project

RPG Maker => Event Systems => Topic started by: poxy on July 20, 2010, 10:59:37 pm

Title: [XP] Actor Critical HP Alert
Post by: poxy on July 20, 2010, 10:59:37 pm
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




Screenshots
Spoiler: ShowHide

(http://i948.photobucket.com/albums/ad329/poxysmash/crit_screen1.png)
(http://i948.photobucket.com/albums/ad329/poxysmash/crit_screen2.png)



Demo

Not necessary.


Instructions

1. Make a common event like so:
Spoiler: ShowHide
(http://i948.photobucket.com/albums/ad329/poxysmash/crithp.png)

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
(http://i948.photobucket.com/albums/ad329/poxysmash/crit_screen3.png)

You can use these images: Full screen:
Spoiler: ShowHide
(http://i948.photobucket.com/albums/ad329/poxysmash/crit_hp_full.png)

Spoiler: ShowHide
(http://i948.photobucket.com/albums/ad329/poxysmash/crit_hp_full2.png)

Discrete (for 1c example):
Spoiler: ShowHide
(http://i948.photobucket.com/albums/ad329/poxysmash/crit_hp.png)

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.
Title: Re: [XP] Actor Critical HP Sound for an ABS
Post by: G_G 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 ^_^
Title: Re: [XP] Actor Critical HP Sound for an ABS
Post by: 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.
Title: Re: [XP] Actor Critical HP Sound for an ABS
Post by: poxy on July 21, 2010, 02:34:47 pm
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.
Title: Re: [XP] Actor Critical HP Alert
Post by: SBR* on July 22, 2010, 04:56:43 am
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...
Title: Re: [XP] Actor Critical HP Alert
Post by: poxy 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. :)
Title: Re: [XP] Actor Critical HP Alert
Post by: SBR* on July 22, 2010, 05:10:07 pm
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?
Title: Re: [XP] Actor Critical HP Alert
Post by: poxy on July 25, 2010, 10:06:17 pm
Weird, I can't reproduce the error. It was just a non descriptive "Script Error"..