GSC reference › Built-in
BallSetTarget()
Built-in (engine)
Server
Called on: ball
Sets the target of the ball to the given entity, and resets if no entity is specified.
Signature
<ball> BallSetTarget(<target>, [targetOffset])
Called on an entity: ball BallSetTarget(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| target | Required | The target of the missile |
| targetOffset | Optional | Offset to the target location (vector3) |
Example (from Treyarch's docs)
self BallSetTarget( player )
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_weap_ball.gsc, line 1742
ball ballsettarget(target, (0, 0, newoffs)); - scripts/mp/gametypes/ball.gsc, line 1817
ball ballsettarget(target, (0, 0, newoffs));
Related built-ins
- SetTurretTargetEnt()Set the target entity for this vehicle turret.
- SetTurretTargetRelativeAngles()Set the target entity for this vehicle turret.
- Target_Set()Adds a new target to draw on the hud
- SetTurretTargetVec()Set the target position for this vehicle turret.
- missile_settarget()Sets the target of the missile to the given entity, and resets if no entity is specified.
- SetEntityTarget()Set an entity as the AI's target.
- SetTargetEntity()Sets the target of this turret
- SetGunnerTargetEnt()Set the target entity for this vehicle gunner.
- SetTargetOrigin()Sets the target origin of this turret or vehicle weapon
- SetGunnerTargetVec()Set the target position for this vehicle turret gunner.
- SetTargetYaw()Set the target yaw direction for this vehicle.
- Target_SetTurretAquire()Sets if the target can be attacked by SAM turrets
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).