GSC reference › Built-in
AllWeaponAttachmentsUnlocked()
Built-in (engine)
Server
Are all the weapon attachments unlocked for this weapon?
Signature
AllWeaponAttachmentsUnlocked(<weapon>)
Parameters
| Name | Required? | Details |
|---|---|---|
| weapon | Required | weapon |
Example (from Treyarch's docs)
player AllWeaponAttachmentsUnlocked( weapon )
Real uses in BO3's scripts
Called 1 time in the decompiled scripts. A few, zombies first:
- scripts/mp/_challenges.gsc, line 633
if(weapon.attachments.size > 5 && player allweaponattachmentsunlocked(weapon) && !isdefined(attacker.tookweaponfrom[weapon]))
Related built-ins
- gettotalunlockedweaponattachments()Get total number of attachments that are unlocked for the weapon specified
- WeaponHasAttachmentAndUnlocked()Does the weapon have all the attachments specified?
- GetWeaponAttachments()
- GetWeaponWithAttachments()Get the requested weapon object
- GetRandomCompatibleAttachmentsForWeapon()Returns an array of compatible attachments.
- GetWeapon()Get the requested weapon object based on game mode agnostic weapon name string
- GetCurrentWeapon()Gets the current player weapon
- GiveWeapon()Give a weapon to the player
- HasWeapon()Returns true if the player has the given weapon
- TakeWeapon()Take the weapon
- SwitchToWeapon()Switch to a different weapon or cycle weapons if no weapon is given
- SetWeaponAmmoClip()Set the weapon's ammo
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).