Ragdoll Deathmatch (RDM) is a Garry's Mod gamemode that uses the Fretta base. It is based off of the game Ragdoll Masters, but is completely multiplayer. This is being created for the Garry's Mod Fretta competition.
RDM has reached milestone 2! What is that milestone you ask? Why, it is hit detection!
Hit detection is normally done by traces from a gun straight ahead until it hits something. If it hits a player, they take damage. Since we aren't using guns, we cannot do anything even close to this.
Since we don't want to do a bunch of traces on every think (that would lag a LOT), we decided to add another entity (rdm_hitbox) to go on hands and feet. This is a basic entity that will not collide with anything while having a shape and size (a box).
On a physics collision, rdm_hitbox ignores the collision UNLESS it is a ragdoll that another player is controlling. If it does hit another player, it checks a table of multipliers (so that if you hit someon's head, it does 3 times the damage...) and then takes away their health.
Our next milestone: Powerups!
No articles were found matching the criteria specified. We suggest you try the article list with no filter applied, to browse all available. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.