GSC reference › Built-in
SetWeaponLockOnPercent()
Built-in (engine)
Server
Player Called on: player
Set the weapon lockon completion percentage
Signature
<player> SetWeaponLockOnPercent(<weapon>, <heat>)
Called on an entity: player SetWeaponLockOnPercent(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| weapon | Required | The weapon (player should have this weapon) |
| heat | Required | The heat percent to set |
Example (from Treyarch's docs)
self SetWeaponLockOnPercent( weapon, 0.0 )
Real uses in BO3's scripts
Called 3 times in the decompiled scripts. A few, zombies first:
- scripts/shared/weapons/_heatseekingmissile.gsc, line 255
self setweaponlockonpercent(weapon, 0); - scripts/shared/weapons/_heatseekingmissile.gsc, line 276
self setweaponlockonpercent(weapon, 0); - scripts/shared/weapons/_heatseekingmissile.gsc, line 294
self setweaponlockonpercent(weapon, (timepassed / locklength) * 100);
Related built-ins
- SetBlockWeaponPickup()Blocks the player from picking up other weapons while using this weapon
- WeaponLockFree()Clears player's weapon lock.
- WeaponLockStart()Begins player's weapon lockon sequence (hud effects, etc).
- WeaponLockNoClearance()When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that there is an obstruction.
- WeaponLockRemoveSlot()Removes the given slot values and compresses the remaining slots (i.e.
- WeaponLockFinalize()Locks player's weapon onto an entity.
- WeaponLockTargetTooClose()When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that they are too close.
- SetWeaponHackPercent()Set the weapon hack completion percentage
- SetWeaponFriendlyTargetLocked()Set the weapon lockon completion percentage
- WeaponLockDetect()Sets the tartget as detected.
- SetWeaponHeatPercent()Set the weapon heat percentage
- WeaponLockCount()Returns the number of active lock objects (i.e.
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).