‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_hero_weapon.gsc File Reference

Go to the source code of this file.

Macros

#define HERO_CLIENTFIELD_POWER   "zmhud.swordEnergy"
 
#define HERO_CLIENTFIELD_POWER_FLASH   "zmhud.swordChargeUpdate"
 
#define HERO_CLIENTFIELD_STATE   "zmhud.swordState"
 
#define HERO_MAXPOWER   100
 
#define HERO_MINPOWER   0
 
#define HERO_STATE_CHARGING   1
 
#define HERO_STATE_HIDDEN   0
 
#define HERO_STATE_INUSE   3
 
#define HERO_STATE_READY   2
 
#define HERO_STATE_UNAVAILABLE   4
 

Functions

function __init__ ()
 
function continue_draining_hero_weapon (w_weapon)
 
function default_give (weapon)
 
function default_power_empty (weapon)
 
function default_power_full (weapon)
 
function default_take (weapon)
 
function default_unwield (weapon)
 
function default_wield (weapon)
 
function gadget_hero_weapon_on_activate (slot, weapon)
 
function gadget_hero_weapon_on_off (slot, weapon)
 
function hero_power_event (player, ai_enemy)
 
function hero_power_event_callback (e_player, ai_enemy)
 
function is_hero_weapon_in_use ()
 
function on_player_spawned ()
 
function player_hero_power_event (ai_enemy)
 
function register_hero_recharge_event (w_hero, func)
 
function register_hero_weapon (weapon_name)
 
function register_hero_weapon_give_take_callbacks (weapon_name, give_fn=&default_give, take_fn=&default_take)
 
function register_hero_weapon_power_callbacks (weapon_name, power_full_fn=&default_power_full, power_empty_fn=&default_power_empty)
 
function register_hero_weapon_wield_unwield_callbacks (weapon_name, wield_fn=&default_wield, unwield_fn=&default_unwield)
 
function set_hero_weapon_state (w_weapon, state)
 
function take_hero_weapon ()
 
function watch_for_glitches (slot, weapon)
 
function watch_hero_power (w_weapon)
 
function watch_hero_weapon_change ()
 
function watch_hero_weapon_give ()
 
function watch_hero_weapon_take ()
 

Macro Definition Documentation

◆ HERO_CLIENTFIELD_POWER

#define HERO_CLIENTFIELD_POWER   "zmhud.swordEnergy"

Definition at line 44 of file _zm_hero_weapon.gsc.

◆ HERO_CLIENTFIELD_POWER_FLASH

#define HERO_CLIENTFIELD_POWER_FLASH   "zmhud.swordChargeUpdate"

Definition at line 45 of file _zm_hero_weapon.gsc.

◆ HERO_CLIENTFIELD_STATE

#define HERO_CLIENTFIELD_STATE   "zmhud.swordState"

Definition at line 46 of file _zm_hero_weapon.gsc.

◆ HERO_MAXPOWER

#define HERO_MAXPOWER   100

Definition at line 42 of file _zm_hero_weapon.gsc.

◆ HERO_MINPOWER

#define HERO_MINPOWER   0

Definition at line 41 of file _zm_hero_weapon.gsc.

◆ HERO_STATE_CHARGING

#define HERO_STATE_CHARGING   1

Definition at line 34 of file _zm_hero_weapon.gsc.

◆ HERO_STATE_HIDDEN

#define HERO_STATE_HIDDEN   0

Definition at line 33 of file _zm_hero_weapon.gsc.

◆ HERO_STATE_INUSE

#define HERO_STATE_INUSE   3

Definition at line 36 of file _zm_hero_weapon.gsc.

◆ HERO_STATE_READY

#define HERO_STATE_READY   2

Definition at line 35 of file _zm_hero_weapon.gsc.

◆ HERO_STATE_UNAVAILABLE

#define HERO_STATE_UNAVAILABLE   4

Definition at line 37 of file _zm_hero_weapon.gsc.

Function Documentation

◆ __init__()

◆ continue_draining_hero_weapon()

function continue_draining_hero_weapon ( w_weapon  )

◆ default_give()

function default_give ( weapon  )

◆ default_power_empty()

function default_power_empty ( weapon  )

◆ default_power_full()

function default_power_full ( weapon  )

Definition at line 179 of file _zm_hero_weapon.gsc.

References HERO_STATE_READY, set_hero_weapon_state(), and show_hint_text().

Referenced by register_hero_weapon().

◆ default_take()

function default_take ( weapon  )

Definition at line 142 of file _zm_hero_weapon.gsc.

References HERO_STATE_HIDDEN, and set_hero_weapon_state().

Referenced by register_hero_weapon().

◆ default_unwield()

function default_unwield ( weapon  )

◆ default_wield()

function default_wield ( weapon  )

Definition at line 158 of file _zm_hero_weapon.gsc.

References HERO_STATE_INUSE, and set_hero_weapon_state().

Referenced by register_hero_weapon(), and wield_gravityspikes().

◆ gadget_hero_weapon_on_activate()

function gadget_hero_weapon_on_activate ( slot  ,
weapon   
)

Definition at line 64 of file _zm_hero_weapon.gsc.

Referenced by __init__().

◆ gadget_hero_weapon_on_off()

function gadget_hero_weapon_on_off ( slot  ,
weapon   
)

Definition at line 68 of file _zm_hero_weapon.gsc.

References watch_for_glitches().

Referenced by __init__().

◆ hero_power_event()

function hero_power_event ( player  ,
ai_enemy   
)

◆ hero_power_event_callback()

function hero_power_event_callback ( e_player  ,
ai_enemy   
)

Definition at line 342 of file _zm_hero_weapon.gsc.

References hero_power_event().

Referenced by __init__().

◆ is_hero_weapon_in_use()

function is_hero_weapon_in_use ( )

Definition at line 402 of file _zm_hero_weapon.gsc.

References HERO_STATE_INUSE, and IS_EQUAL.

Referenced by gravity_trap_loop().

◆ on_player_spawned()

function on_player_spawned ( )

◆ player_hero_power_event()

◆ register_hero_recharge_event()

function register_hero_recharge_event ( w_hero  ,
func   
)

Definition at line 328 of file _zm_hero_weapon.gsc.

Referenced by __init__().

◆ register_hero_weapon()

function register_hero_weapon ( weapon_name  )

◆ register_hero_weapon_give_take_callbacks()

function register_hero_weapon_give_take_callbacks ( weapon_name  ,
give_fn  = &default_give,
take_fn  = &default_take 
)

Definition at line 118 of file _zm_hero_weapon.gsc.

◆ register_hero_weapon_power_callbacks()

function register_hero_weapon_power_callbacks ( weapon_name  ,
power_full_fn  = &default_power_full,
power_empty_fn  = &default_power_empty 
)

Definition at line 168 of file _zm_hero_weapon.gsc.

Referenced by __init__().

◆ register_hero_weapon_wield_unwield_callbacks()

function register_hero_weapon_wield_unwield_callbacks ( weapon_name  ,
wield_fn  = &default_wield,
unwield_fn  = &default_unwield 
)

Definition at line 147 of file _zm_hero_weapon.gsc.

Referenced by __init__().

◆ set_hero_weapon_state()

◆ take_hero_weapon()

function take_hero_weapon ( )

Definition at line 393 of file _zm_hero_weapon.gsc.

Referenced by bleed_out().

◆ watch_for_glitches()

function watch_for_glitches ( slot  ,
weapon   
)

Definition at line 73 of file _zm_hero_weapon.gsc.

References is_hero_weapon(), and switch_back_primary_weapon().

Referenced by gadget_hero_weapon_on_off().

◆ watch_hero_power()

function watch_hero_power ( w_weapon  )

◆ watch_hero_weapon_change()

function watch_hero_weapon_change ( )

Definition at line 238 of file _zm_hero_weapon.gsc.

References is_hero_weapon().

Referenced by on_player_spawned().

◆ watch_hero_weapon_give()

function watch_hero_weapon_give ( )

Definition at line 204 of file _zm_hero_weapon.gsc.

References is_hero_weapon(), and watch_hero_power().

Referenced by on_player_spawned().

◆ watch_hero_weapon_take()

function watch_hero_weapon_take ( )

Definition at line 221 of file _zm_hero_weapon.gsc.

References is_hero_weapon().

Referenced by on_player_spawned().