GSC reference › Built-in
ServerObjective_GetObjectiveEntity()
Built-in (engine)
Client
Returns the entity of the objective
Signature
ServerObjective_GetObjectiveEntity(<localClientNum>, <objectiveID>)
Parameters
| Name | Required? | Details |
|---|---|---|
| localClientNum | Required | The local client number |
| objectiveID | Required | The index of objective |
Returns
entity
Example (from Treyarch's docs)
origin = ServerObjective_GetObjectiveEntity( localClientNum, objective_num )
Real uses in BO3's scripts
Called 4 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_weap_ball.csc, line 113
goal_entity = serverobjective_getobjectiveentity(localclientnum, goal.objectiveid); - scripts/mp/gametypes/ball.csc, line 97
goal_entity = serverobjective_getobjectiveentity(localclientnum, goal.objectiveid); - scripts/mp/gametypes/ctf.csc, line 63
flag_entity = serverobjective_getobjectiveentity(localclientnum, flag.objectiveid); - scripts/mp/gametypes/dom.csc, line 72
flag_entity = serverobjective_getobjectiveentity(localclientnum, flag_objective);
Related built-ins
- Objective_OnEntity()Sets the objective to get its position from an entity.
- ServerObjective_GetObjective()Returns the index of the objective or undefined if it does not exist
- Objective_ClearEntity()Clears the entity previous set on the objective
- ServerObjective_GetObjectiveOrigin()Returns the index of the objective or undefined if it does not exist
- ServerObjective_GetObjectiveTeam()Returns the origin of the objective
- GetEquipmentHeadObjective()Returns the equipment head objective as described in the grenadeweapon gdt.
- GetCrateHeadObjective()Returns the equipment head objective as described in the grenadeweapon gdt.
- Objective_GetGamemodeFlags()Gets the gamemode flags for the objective.
- ServerObjective_GetObjectiveProgress()Returns the origin of the objective
- ServerObjective_GetObjectiveGameModeFlags()Returns the origin of the objective
- GetEntityNumber()Get the entity number of the entity
- Objective_Add()Add a new objective, with ability to specify all the info for the objective
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).