#  ![](https://www.realm667.com/media/kunena/topic_icons/realm667/user/mugshot.png) \[Help\] Low health fade/blood splatter effect

##

- **CaptainManiac**
- ![CaptainManiac's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar4791.png) Topic Author
- Cacodemon
- ![Cacodemon](https://www.realm667.com/media/kunena/ranks/rank_8_caco.png)

 Less More- Posts: 103
-
-
-
-

   9 years 9 months ago [\#5053](#5053) by CaptainManiac  Replied by *CaptainManiac* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5053 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Thank you a lot.The health fading screen script now works.Also,to the on 40% health screen fading:I have planned to make the fading to grey and with image of blood to make bleeeding effect(which is then turned to fading red).Thank you very much

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **CaptainManiac**
- ![CaptainManiac's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar4791.png) Topic Author
- Cacodemon
- ![Cacodemon](https://www.realm667.com/media/kunena/ranks/rank_8_caco.png)

 Less More- Posts: 103
-
-
-
-

   9 years 9 months ago [\#5054](#5054) by CaptainManiac  Replied by *CaptainManiac* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5054 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Thank you very much.The script now fully works.To be honest,i got the idea of a open world Nazi game called The Saboteur where the same effect replaces fully the health HUD and i think it is cool.Also,about the blood on screen along with the faded grey,i wanted it to be like that.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **BadMojo**
- ![BadMojo's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar6827.gif)
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 224
-
-
-
-

   9 years 9 months ago [\#5055](#5055) by BadMojo  Replied by *BadMojo* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5055 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Cool, Im glad I could help... Im still learning too believe it or not, Ive not really played with action script much, but I have enough knowledge of c++ to get the logic side of things right.

Ive also been messing around with a blood splatter image, another thing id suggest is to set an alpha flag on the hudmessage... so that the blood can be seen through rather than disrupting the view, so try this one: HudMessage(s:"A";HUDMSG_FADEOUT | HUDMSG_ALPHA,0,CR_RED, 0.5,-0.5,1.0, 3.0, 0.5);

the last number is the alpha, 1.0 being full opaque and 0.0 being invisible.. so 0.5 is a good starting point.... or I guess if your using true colour for your graphics, then a 50% translucency applied to the image will also work... might also want to play with the second to last number, which is the fade out time aswell... 3.0 might be ok.

Theres alot of things Id like to play with in your code so I can add it to my megawad Im working on (you were right, it is a good idea ![;)](https://www.realm667.com/wink.gif ";)")), so if I come up with anything good Ill post it in the workshop or pm it to you... might even make my own blood splats in photoshop and have the code randomly choose one on each call to make the effect more natural... well anyway, good luck ![:)](https://www.realm667.com/media/kunena/emoticons/cacsmi.gif ":)")

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   9 years 9 months ago [\#5058](#5058) by MagicWazard  Replied by *MagicWazard* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5058 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Glad you guys got this worked out! Sounds a lot like the kind of effect you see in modern shooters (like Gears of War) that rely on visual cues instead of a dedicated health measurement in the HUD. Not the kind of thing I prefer in place of a bar or numeral, but can be used to interesting effect.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **BadMojo**
- ![BadMojo's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar6827.gif)
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 224
-
-
-
-

   9 years 9 months ago [\#5059](#5059) by BadMojo  Replied by *BadMojo* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5059 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Actually, I was wondering if there was a way to capture taking damage so we can get this working when being shot rather than getting to a certain health level?

if that makes any sense at all.... I did ask at zdoom forums but no ones noticed it yet ![:(](https://www.realm667.com/frown.gif ":(")

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   9 years 9 months ago [\#5060](#5060) by MagicWazard  Replied by *MagicWazard* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5060 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

> BadMojo wrote: Actually, I was wondering if there was a way to capture taking damage so we can get this working when being shot rather than getting to a certain health level?
>
> if that makes any sense at all.... I did ask at zdoom forums but no ones noticed it yet ![:(](https://www.realm667.com/frown.gif ":(")

Probably just calling the ACS each time the player goes to his Pain state. The player always goes to his Pain state when taking damage, so there's no risk of it not triggering for certain attacks/damage sources.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **BadMojo**
- ![BadMojo's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar6827.gif)
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 224
-
-
-
-

   9 years 9 months ago [\#5061](#5061) by BadMojo  Replied by *BadMojo* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5061 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 cheers, that sounds like it will work... silly me... I kept on thinking that there was a TakingDamage function, or something like that within acs.. I was thinking about it all wrong.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **BadMojo**
- ![BadMojo's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar6827.gif)
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 224
-
-
-
-

   9 years 9 months ago [\#5062](#5062) by BadMojo  Replied by *BadMojo* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5062 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Ok well heres what I came up with: https://www.dropbox.com/s/267l6avk62rh08e/BLOODSPLAT.zip?dl=0

Its a little bit more complicated than before, but it works.. Map01 is just a test map that uses script 1 (the original thing we were doing, but with a few more additions to the code, Ive commented what Ive done).. blood splatter will now also work when getting shot or taking damage.

If it wasnt for the fact that it modifies the doomplayer actor, this could be a good addition to the sfx section here on realm.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **MagicWazard**
- ![MagicWazard's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar517.png)
- Moderator
- ![Moderator](https://www.realm667.com/media/kunena/ranks/rank_20_barrel.png)

 Less More- Posts: 808
-
-
-
-

   9 years 9 months ago [\#5063](#5063) by MagicWazard  Replied by *MagicWazard* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5063 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

> BadMojo wrote: If it wasnt for the fact that it modifies the doomplayer actor, this could be a good addition to the sfx section here on realm.

There's no rule against modding the player actor for SFX. ![;)](https://www.realm667.com/wink.gif ";)") Obviously you'd want to include detailed instructions if you were to go that route, of course.

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

- **BadMojo**
- ![BadMojo's Avatar](https://www.realm667.com/media/kunena/avatars/resized/size144/users/avatar6827.gif)
- Wicked
- ![Wicked](https://www.realm667.com/media/kunena/ranks/rank_81_wicked.png)

 Less More- Posts: 224
-
-
-
-

   9 years 9 months ago [\#5065](#5065) by BadMojo  Replied by *BadMojo* on topic *[My childish questioning again....](https://www.realm667.com/forum/the-workshop/834-help-low-health-fade-blood-splatter-effect?start=10#5065 "Hi.Sorry for my childish questioning.To be honest,i tried to make a script that fades screen when player's health lowers.I tried the script in game and it does not work.I do not make it for a project...")*

 Well, if CaptainManiac is ok with me submitting it (Adding credits with him included of course), then ill start fixing it up for submission. ![:)](https://www.realm667.com/media/kunena/emoticons/cacsmi.gif ":)")

Please [Log in](https://www.realm667.com/component/users/login?return=aHR0cHM6Ly93d3cucmVhbG02NjcuY29tL2ZvcnVtL3RoZS13b3Jrc2hvcC84MzQtaGVscC1sb3ctaGVhbHRoLWZhZGUtYmxvb2Qtc3BsYXR0ZXItZWZmZWN0P3N0YXJ0PTEw&Itemid=2662) or [Create an account](https://www.realm667.com/component/users/registration?Itemid=2662) to join the conversation.

[Powered by](https://www.realm667.com/forum/credits) [Kunena Forum](https://www.kunena.org)
