MP DM Damage Callbacks

Description

This is an example of how to extend the base class (MPDamageCallbacks) with additional callback logic for ‘Damage’ events. In this example, we refresh the ‘Deaths’, ‘Frags’, and ‘Score’ stats declared in MPDMPlayerStats every time a player dies. We also broadcast a new game state (containing these updated stats only) to reflect the changes on all machines.

MPDMDamageCallbacks is an example of extending the base MPDamageCallbacks class to implement additional logic specific to the deathmatch game mode. It demonstrates how to handle ‘Damage’ events and update player stats accordingly. Study the base class to understand the ‘TransmitKill’ callback functionality. Customize MPDMDamageCallbacks based on your game’s scoring and stat tracking requirements for the deathmatch game mode.

Inspector Fields

Sync Prop Health

Type: bool

Description: Set this to true to always keep non-player Health/IDamageTargets in perfect sync on all machines. This is not necessarily needed unless true pro play sync is required, as the master client will force-kill things that die in its scene anyway.

Default Value: false

Score Per Frag

Type: int

Description: The score awarded per frag (kill) in the deathmatch game mode.

Default Value: 10

Score Per Death

Type: int

Description: The score deducted per death in the deathmatch game mode.

Default Value: -10

Score Per Team Kill

Type: int

Description: The score deducted per team kill in the deathmatch game mode.

Default Value: -10

What are your feelings
Updated on August 14, 2023