MP DM Objective Base

Description

The base class for all objectives in the game modes. It provides functionality for applying bonus scores to players within the bonus zone trigger. The position and rotation of the root object can be synchronized.

Tips: For examples on how to extend this class, refer to MPDMObjectiveRush.cs, MPDMObjectiveConquest.cs, and MPDMObjectiveCTF.cs.

Inspector Fields

Spawn Grouping

Type: int

Description: Specifies the grouping value for child spawnpoints when owned by the local team. UI buttons for spawning utilize this value. It determines the grouping behavior of spawnpoints.

Default Value: -1

Defending Team Number

Type: int

Description: Specifies the team number for the defending team. A value of -1 indicates no team is assigned for defense.

Default Value: -1

Team Score Amount

Type: int

Description: Specifies the bonus score awarded to the team when the objective is completed successfully.

Default Value: 100

Defend Score Amount

Type: int

Description: Specifies the bonus score awarded for defending the objective while inside the objective’s bonus trigger.

Default Value: 10

Attack Score Amount

Type: int

Description: Specifies the bonus score awarded for attacking the objective while inside the objective’s bonus trigger.

Default Value: 10

Capturing Score Amount

Type: int

Description: Specifies the score awarded for capturing progress towards the objective.

Default Value: 10

Capture Score Amount

Type: int

Description: Specifies the bonus score awarded for successfully capturing the objective.

Default Value: 50

Sync Position

Type: bool

Description: Specifies whether the root object of the objective should synchronize its position. Set it to false if the object is not meant to move or if it’s a child of another moving object, as it helps save data.

Default Value: false

Sync Rotation

Type: bool

Description: Specifies whether the root object of the objective should synchronize its rotation. Set it to false if the object is not meant to rotate or if it’s a child of another rotating object, as it helps save data.

Default Value: false

Layer Mask

Type: LayerMask

Description: Specifies the layer mask used to check for bonus scoring within the objective. Only objects on the specified layers will contribute to bonus scoring and or capturing of objectives.

Default Value: Default layer

Objective Game Object

Type: GameObject

Description: Specifies the GameObject representing the objective. If null, it defaults to the current object itself.

Default Value: null

Objective Renderers

Type: Renderer[]

Description: An array of Renderers representing the objective’s visual components. If null, it defaults to the first Renderer found among the children of the objective GameObject.

Default Value: null

Mini Map Scene Objects

Type: MiniMap.MiniMapSceneObject[]

Description: An array of MiniMapSceneObject instances representing the objective’s data for the minimap. It provides visual information about the objective’s position and status on the minimap.

Default Value: Empty array (length = 0)

What are your feelings
Updated on August 14, 2023