Game Suggestions on Damage

The damage system of UE4 is generally very good, but it has some difficult aspects in terms of gameplay. The main reason is that BaseDamage can only pass a float and cannot pass more values.

For example, a Damaged Actor may have armor, while an attacker may have attributes such as armor penetration. So a float is far from enough.

In actual production, we often need to adopt alternatives. For example, build an Interface Bluepoint instead of Damage. But Interface Bluepoint does not generate events on the server, but locally, which can cause security problems.

Or we need to carry the message from Damage Causer and pass it through Damage to Damaged Actor. But Damage Causer may be destroyed immediately after the damage is done (for example, if it is a bullet). This may lead to Damaged Actor Failed to Cast to Damage Causer (if Cast is too slow).

DamageType may be a good approach, but the problem is that it cannot be instantiated as Object. So the DamageType we created ourselves can only deliver fixed data, and in fact attributes such as armor penetration may be related to players’equipment, rank, occupation, etc. It’s not a constant.

So I would like to make an improved gameplay proposal to make BaseDamage a struct, preferably one that we declare ourselves. In this way, no matter what kind of damage system we want to make, we can define the data to be transmitted according to our own needs.

Or construct a DamageType that can be instantiated, and each Object can have data from changes in Player Character, which can also solve the problem.

Otherwise, I think the Damage function may not be useful.

1 Like

Hi,

usually, for multiplayer games, you don’t destroy actors immediately. Do a Multicast from the server which hides and disabled the collision. after a delay you destroy the actor.
This way you can for sure cast to the actor and get all necessary information.