When messing about in zombie survival I came across a neat little feature that allowed the player to be knocked off of their feet from explosions/fall damage, followed soon by the bones of the fallen ragdoll interpolating to the bone positions of the standing player.
In viewing the code I found that Jetboom uses a rather confusing status system to apply ‘status_’ entities to a player, which are tied into the gamemode.
Sadly, the ability to make sense of his code is beyond me.
My challenge to you, the coding community, is to create a swep that does the following:
-On taking more than 25 explosion damage, the player catapults away from the source of damage and gets up three seconds later with 1/4 health.
-On taking more than 50 fall damage, the player emits a crunching sound and gets up four seconds later with 1/10 health.
-If the player is shot in the head, there’s a 50% chance they’ll be stunned and knocked over for one second, otherwise they’re instantly dead.
-When the player is ragdolled, the camera is parented to the ‘eyes’ attachment.
I have some knowledge in coding, and plan to incorporate any help I receive into the combat system I’ve been developing for a few weeks.