zm_utility::is_offhand_weapon()
True/false check: is offhand weapon? BO3's decompiled scripts carry no docs for this one: the description is ours, from its name and use.
Signature
zm_utility::is_offhand_weapon(weapon)
Needs #using the script that defines it (scripts/zm/_zm_utility.gsc).
Parameters
| Name |
|---|
| weapon |
The decompiled scripts don't keep default values, so some of these may be optional: check the real uses below.
Real uses in BO3's scripts
Called 12 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_devgui.gsc, line 706
if(zm_utility::is_offhand_weapon(weapon) && !zm_utility::is_melee_weapon(weapon)) - scripts/zm/_zm_laststand.gsc, line 310
if(self isthrowinggrenade() && zm_utility::is_offhand_weapon(self.lastactiveweapon)) - scripts/zm/_zm_magicbox.gsc, line 359
return zm_utility::is_offhand_weapon(weapon); - scripts/zm/_zm_weapon_locker.gsc, line 183
if(zm_utility::is_offhand_weapon(weapon) || zm_utility::is_limited_weapon(weapon)) - scripts/zm/_zm_weapons.gsc, line 2970
if(!zm_utility::is_offhand_weapon(weapon))
More in zm_utility::
- zm_utility::is_player_valid()True if the player is alive, spawned and not in last stand (options to ignore some checks).
- zm_utility::setsharedinventoryuimodels()Client: clientfield callback that updates the shared inventory UI models.
- zm_utility::in_revive_trigger()True if the player is inside a revive trigger.
- zm_utility::add_sound()Adds sound.
- zm_utility::is_placeable_mine()True if the weapon is a placeable mine.
- zm_utility::get_player_tactical_grenade()Returns the player's tactical grenade weapon.
- zm_utility::play_sound_at_pos()Plays a sound alias at a world position.
- zm_utility::is_magic_bullet_shield_enabled()True if magic bullet shield is on for the entity.
- zm_utility::get_current_zone()Returns the name of the zone the player is in.
- zm_utility::register_melee_weapon_for_level()Registers a weapon as a melee weapon for the level.
- zm_utility::approximate_path_dist()zm_utility helper: approximate path distance.
- zm_utility::register_tactical_grenade_for_level()Registers a weapon as a tactical grenade for the level.
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).