#How to make a PvP damage/health system

1 messages · Page 1 of 1 (latest)

torpid agate
#

Sharing the "damage changing system" would be a good start.

south raft
torn sphinx
#

Not enough info to go off of. I mean, hurting an enemy can be as simple as health -= damage, but I'm guessing you want something a bit more complex than that. Perhaps if you give an idea of what you've got at the moment, and what you're aiming for people can help you better.

karmic pier
#

I'm not sure whether you're using Godot's built in replication system, or a custom dedicated server.

If you're using custom dedicated I would implement it like this:

  • player A shoots at player B
  • player A tells server that he has done so, and which part of the body was hit
  • server makes sure that it's currently possible to be true (I.e. Close enough, etc.)
  • server calculates damage
  • server tells player B that player A has hit him with a certain gun on a certain body part for a certain amount of damage
  • player B replicates the damage on itself
south raft
#

The second one

#

Where a shots b with a specific gun and then b takes damage according to the gun