Scratch and Claw effects on FPS player screen

Not sure if this has been asked in quite this way. I'm looking to do something hopefully a little unique. I want when my Alien Zombie characters attack my FPS player with a bitting and clawing attack that Bloody scratches and blood splatters will appear all over the screen and get steadily worse as my FPS players health decreases. and also to have it fade gradually as his health gets better from picking up health boxes that add to the health bar.

Also I'm wondering if there is a way to make like a heart beat sound on my FPS player that gets faster and a little louder as damage is done to him also.

Yeah I know it's a bunch to ask, but I think it would be a super cool effect perfect for the FPS game I've trying to develop all by my lil lonesome lol ;)

3 Answers

3

What efge said, with the addition of a few links:

  • GUI.DrawTexture (You'd want your rect size to be `Rect(0,0,Screen.width,Screen.height`)
  • Textures (You'd want to put a claw texture, or perhaps several, on a plane that's using the transparent cutout shader)
  • The lerp function (You'd want to lerp between Color.clear and Color.white based on your health. Lerp takes a value and changes it between color one and color two based on a float between 0 and 1 that you put in, so if you have, let's say, 50 health, you'd divide that by 100 to get .50, then lerp between Color.clear and Color.white to get a 50% transparent texture. You would apply this material to the plane in front of your camera.)
  • Audio (You'd likely want to change the pitch and volume for the effect you're trying to achieve).

You could display a plane with transparent textures applied in front of the camera (e.g. make the plane a child of the camera) or use GUI.DrawTexture.

To fade the visibility according to health status you could use Color.Lerp or Material.Lerp.

For modifying the sound you could try to change the values for AudioSource.volume and AudioSource.pitch.


Edit:

You could also use a ParticleSystem to simulate drops of blood on your screen. Create the PS as a child of your camera, adjust the settings and texture(s) and set Simulate in Worldspace to false.

Did you manage to get the audio modification to work?

Thanks but nope, I tried looking on google for a tutorial or even some kind of sample of what I was wanting to do but no such luck :(

I just answered a similar question yesterday http://answers.unity3d.com/questions/47547/how-make-a-bloodscreen/47575#47575 . (my script doesnt show you how to make it fade out but the answer below mine does)

I tried that one and could not seem to get it to do what it was supposed to. but I found this one: http://answers.unity3d.com/questions/18306/shoot-the-player-effect/18310#18310 And I was able to get that one to work. It's NOT exactly what I'm looking for but I changed the blood effect to something with a little more gore sample here: http://sicklilmonky.deviantart.com/#/d3c7w1f In my description is more what I'm ACTUALLY in desire of, but this one works.