GSC reference › Built-in
SetTargetOrigin()
Built-in (engine)
Server
Called on: turret_or_vehicle
Sets the target origin of this turret or vehicle weapon
Signature
<turret_or_vehicle> SetTargetOrigin(<origin>)
Called on an entity: turret_or_vehicle SetTargetOrigin(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| origin | Required | the turret target origin |
Example (from Treyarch's docs)
roof_turret SetTargetOrigin( origin )
Real uses in BO3's scripts
Called 8 times in the decompiled scripts. A few, zombies first:
- scripts/shared/vehicles/_quadtank.gsc, line 227
self settargetorigin(target_vec); - scripts/shared/vehicles/_quadtank.gsc, line 275
self settargetorigin(target_vec); - scripts/shared/vehicles/_quadtank.gsc, line 790
self settargetorigin(target_vec); - scripts/cp/_cic_turret.gsc, line 177
self settargetorigin(target_vec); - scripts/cp/_turret_sentry.gsc, line 445
self settargetorigin(target_vec);
Related built-ins
- Target_OriginIsInCircle()Returns whether a target is within a given radius from the center of the player's screen
- GetTargetOrigin()Gets the target origin of this turret or vehicle weapon
- GetTagOrigin()Gets the origin of the tag
- SetOrigin()Set the player's origin
- SetTurretTargetEnt()Set the target entity for this vehicle turret.
- SetTurretTargetRelativeAngles()Set the target entity for this vehicle turret.
- GetOrigin()Get the origin of the entity
- Target_Set()Adds a new target to draw on the hud
- ClearTargetEntity()Clears the current target for this vehicle or turret.
- Target_Remove()Removes a target
- ClearTurretTarget()Clear the target for the vehicle turret.
- IsNoTarget()Returns if the sentient is marked no target
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).