• Wounded Mod
    12 replies, posted
While I was playing around on my server, I got an idea. A wounded mod. Basically like this, say you get shot, if the shot does more than, or equal to, say, 10 health, then you will slowly start to lose health and splat a random blood decal on the ground. To stop the blood loss, you could take a health vial (10 HP) that would stop the blood loss, but not start the healing process. If you gain 5-10 HP, the blood loss stops and you can continue to live, but if you get anything above 10 HP, the blood loss not only stops, but you start to gain health slowly (like a med-kit gives around 50 HP, so that would start the healing process). So, in short, if you get shot you slowly lose health and start splatting blood all over the ground. If you get 5-10 HP, you stop loosing blood. If you gain any more than 10 HP, you start to heal back up to 100 health. EDIT : Also, when your HP drops to around 25, maybe you cant run or sprint. You would have to walk? I dunno, just an idea. Also, while you are loosing blood, you could make a coughing/heavy breathing sound.
I requested help on this a while back, I never did get it all figured out but I have some code if oyu are anygood. I also have a health/speed script if you want. You get slower the more health you lose. Sorry this is all I can do for you. I would like to see that script made also though.
I would like to see that health/speed script.
if ( CLIENT ) then return end function Bleed( ) for k, v in pairs( player.GetAll( ) ) do v:SendLua( "function BleedMotionBlur() DrawMotionBlur( 0.1, 0.79, 0.05 ) end" ) v.WSpeed = math.Clamp( v:Health( ) * 2.5, 40, 250 ) v.RSpeed = math.Clamp( v:Health( ) * 4, 64, 400 ) v:SetWalkSpeed( v.WSpeed ) v:SetRunSpeed( v.RSpeed ) if v:Alive() and not v.Bleeding and v:Health() <= 23 then v:PrintMessage( HUD_PRINTTALK, "You are bleeding, take cover to heal!" ) v:SetWalkSpeed( 50 ) v:SetRunSpeed( 75 ) v.Bleeding = true v:SendLua( "hook.Add( 'RenderScreenspaceEffect', 'BleedBlur', BleedMotionBlur )" ) elseif v.Bleeding and v:Health() > 23 then v.Bleeding = false v:SendLua( "hook.Remove( 'RenderScreenspaceEffect', 'BleedBlur' )" ) end end end hook.Add( "Think", "Bleed", Bleed ) Put This in your lua autorunfolder
So ya just put this in a notepad and put in lua/autorun? if ( CLIENT ) then return end function Bleed( ) for k, v in pairs( player.GetAll( ) ) do v:SendLua( "function BleedMotionBlur() DrawMotionBlur( 0.1, 0.79, 0.05 ) end" ) v.WSpeed = math.Clamp( v:Health( ) * 2.5, 40, 250 ) v.RSpeed = math.Clamp( v:Health( ) * 4, 64, 400 ) v:SetWalkSpeed( v.WSpeed ) v:SetRunSpeed( v.RSpeed ) if v:Alive() and not v.Bleeding and v:Health() <= 23 then v:PrintMessage( HUD_PRINTTALK, "You are bleeding, take cover to heal!" ) v:SetWalkSpeed( 50 ) v:SetRunSpeed( 75 ) v.Bleeding = true v:SendLua( "hook.Add( 'RenderScreenspaceEffect', 'BleedBlur', BleedMotionBlur )" ) elseif v.Bleeding and v:Health() > 23 then v.Bleeding = false v:SendLua( "hook.Remove( 'RenderScreenspaceEffect', 'BleedBlur' )" ) end end end hook.Add( "Think", "Bleed", Bleed ) Put This in your lua autorunfolder[/QUOTE]
im gunna make this :P EDIT: Here you go, its kinda balanced. If thats what you wanted. Download Here: [url]http://www.box.net/shared/a7tatymvfn[/url] 1. The less health, the faster you bleed. 2. You leave a trail of blood wherever you go "If your bleeding of-course". 3. Lower than 30 hp = Slower speed. 4. Take more then 40 points of damage and you will start to bleed. 5. Crouch to stop bleeding and regain lost health from blood loss "Only regain lost health is below 25 HP" 6. Screen shakes on heart beats. 7. Red overlay when bleeding. 8. Blur below 30 hp.
Wow, thank you very much for your help. Actually...quite frankly...I would probably be the most incapable person when it comes to LUA. I see the code, and I just sort of zone out. The only words I can muster up when I see it is "what the fuck..." EDIT: I just tried this, and...like... WOW this is SERIOUSLY worth a release, if you wanted to do it. I encountered just one bug with this, for some reason if you fall high enough to where you could lose some health, you die instantly. Maybe this is just me, I dunno, but other than that, this seriously kicks ass. EXACTLY what I wanted. Thanks man, you're like...sort of killing me slowly on my own game, and I must say, I love it.
[QUOTE=Balls Deep;20021675]Wow, thank you very much for your help. Actually...quite frankly...I would probably be the most incapable person when it comes to LUA. I see the code, and I just sort of zone out. The only words I can muster up when I see it is "what the fuck..." EDIT: I just tried this, and...like... WOW this is SERIOUSLY worth a release, if you wanted to do it. I encountered just one bug with this, for some reason if you fall high enough to where you could lose some health, you die instantly. Maybe this is just me, I dunno, but other than that, this seriously kicks ass. EXACTLY what I wanted. Thanks man, you're like...sort of killing me slowly on my own game, and I must say, I love it.[/QUOTE] Garrys MP_FALLDAMAGE 1 is VERY unreliable it doesnt calculate damage good enough. So try and take damage from a npc rather than a full, Good luck out there :3:
[QUOTE=Wizey!;20024158]Garrys MP_FALLDAMAGE 1 is VERY unreliable it doesnt calculate damage good enough. So try and take damage from a npc rather than a full, Good luck out there :3:[/QUOTE] Yeah, you were right, I turned off mp_falldamage and now everything is fine. Thanks a lot for this mod dude, it totally kicks ass.
[QUOTE=Balls Deep;20040285]Yeah, you were right, I turned off mp_falldamage and now everything is fine. Thanks a lot for this mod [b]dude[/b], it totally kicks ass.[/QUOTE] Im a girl..... or are you just saying Dude for any gender in general >.>
[QUOTE=Wizey!;20040897]Im a girl..... or are you just saying Dude for any gender in general >.>[/QUOTE] Oh really? Well you are one good coding girl xD
I say dude to anyone :downs:
You, use, a lot of, commas,, ,, , , ,, ...
Sorry, you need to Log In to post a reply to this thread.