Best way of telling if someone is in combat?

I making a PVP game and I need to tell when a player is in combat(so that I can delete their tools if they leave). I had a few different ideas, but I thought maybe the community could help me here.

Best way to track combat?
  • When their health is under their max health.
  • If they’ve been damaged in the last 30 seconds
  • Both
  • Other(leave in replies)

0 voters

The first option just puts them in “combat” if they are under their max health.

The second option is if their health has changed in the last 30 seconds.

The third option is a combination of both(they have to not have been damaged within 30 seconds and be at max health).

The fourth option, is whatever other idea you think would work.

Anyway, thanks for the help!

1 Like

A combination of health decrease in last 30 seconds and if their tool is equipped. If an innocent bystander has been attacked, you can’t really count that as being “in combat” with another user. It wouldn’t be fair if they then leave after being damaged slightly otherwise.

1 Like

What my “in combat” system is trying to do is prevent users who are going to die from just leaving the game to prevent losing their tools. If I had it so anyone who didn’t use a tool could leave without being “in combat” they could just not use a tool and leave if someone had better armor/weapons then them.

I do think it could work with some minor adjustments though.

1 Like