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

Go to the source code of this file.

Macros

#define CF_CRACKS_ALL   4
 
#define CF_CRACKS_BLUE   2
 
#define CF_CRACKS_GREEN   3
 
#define CF_CRACKS_RED   1
 
#define MIN_REACH_DIST_SQ   4 * 4
 

Functions

function __init__ ()
 
function _blend_out (animation, n_blend, n_rate, n_start_time)
 
function _do_death_anim (animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp)
 
function _get_align_ent (e_align)
 
function _get_align_pos (v_origin_or_ent, v_angles_or_tag)
 
function _play (animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp, n_start_time, b_show_player_firstperson_weapon, b_unlink_after_completed)
 
function _reach (s_tracker, animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals=false)
 
function add_global_notetrack_handler (str_note, func, pass_notify_params,...)
 
function add_notetrack_func (funcname, func)
 
function attach_weapon (weaponObject, tag="tag_weapon_right")
 
function call_notetrack_handler (str_note, param1, param2)
 
function cracks_off (str_type)
 
function cracks_on (str_type)
 
function detach_weapon (weaponObject, tag="tag_weapon_right")
 
function enable_headlook (b_on=true)
 
function enable_headlook_notorso (b_on=true)
 
function fire_weapon ()
 
function first_frame (animation, v_origin_or_ent, v_angles_or_tag)
 
function handle_notetracks (animation)
 
function is_valid_weapon (weaponObject)
 
function last_frame (animation, v_origin_or_ent, v_angles_or_tag)
 
function play (animation, v_origin_or_ent, v_angles_or_tag, n_rate=1, n_blend_in=.2, n_blend_out=.2, n_lerp=0, n_start_time=0, b_show_player_firstperson_weapon=false, b_unlink_after_completed=true)
 
function reach (animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals=false)
 
function set_death_anim (animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp)
 
function set_player_clamps ()
 
function setup_notetracks ()
 
function stop (n_blend=0.2)
 
function teleport (animation, v_origin_or_ent, v_angles_or_tag, time)
 

Macro Definition Documentation

◆ CF_CRACKS_ALL

#define CF_CRACKS_ALL   4

Definition at line 463 of file animation_shared.gsc.

◆ CF_CRACKS_BLUE

#define CF_CRACKS_BLUE   2

Definition at line 461 of file animation_shared.gsc.

◆ CF_CRACKS_GREEN

#define CF_CRACKS_GREEN   3

Definition at line 462 of file animation_shared.gsc.

◆ CF_CRACKS_RED

#define CF_CRACKS_RED   1

Definition at line 460 of file animation_shared.gsc.

◆ MIN_REACH_DIST_SQ

#define MIN_REACH_DIST_SQ   4 * 4

Definition at line 333 of file animation_shared.gsc.

Function Documentation

◆ __init__()

function __init__ ( )

Definition at line 20 of file animation_shared.gsc.

References setup_notetracks().

◆ _blend_out()

function _blend_out ( animation  ,
n_blend  ,
n_rate  ,
n_start_time   
)

Definition at line 227 of file animation_shared.gsc.

References WAIT_SERVER_FRAME.

Referenced by _play().

◆ _do_death_anim()

function _do_death_anim ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
n_rate  ,
n_blend_in  ,
n_blend_out  ,
n_lerp   
)

Definition at line 437 of file animation_shared.gsc.

References play().

Referenced by set_death_anim().

◆ _get_align_ent()

function _get_align_ent ( e_align  )

Definition at line 251 of file animation_shared.gsc.

References DEFAULT.

Referenced by _get_align_pos().

◆ _get_align_pos()

function _get_align_pos ( v_origin_or_ent  ,
v_angles_or_tag   
)

Definition at line 263 of file animation_shared.gsc.

References _get_align_ent(), DEFAULT, and DEFAULT2.

Referenced by _reach(), and teleport().

◆ _play()

function _play ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
n_rate  ,
n_blend_in  ,
n_blend_out  ,
n_lerp  ,
n_start_time  ,
b_show_player_firstperson_weapon  ,
b_unlink_after_completed   
)

◆ _reach()

function _reach ( s_tracker  ,
animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
b_disable_arrivals  = false 
)

◆ add_global_notetrack_handler()

function add_global_notetrack_handler ( str_note  ,
func  ,
pass_notify_params  ,
  ... 
)

Definition at line 474 of file animation_shared.gsc.

References array, ARRAY_ADD, and DEFAULT.

Referenced by setup_notetracks().

◆ add_notetrack_func()

function add_notetrack_func ( funcname  ,
func   
)

Definition at line 465 of file animation_shared.gsc.

References DEFAULT.

Referenced by setup_notetracks().

◆ attach_weapon()

function attach_weapon ( weaponObject  ,
tag  = "tag_weapon_right" 
)

◆ call_notetrack_handler()

function call_notetrack_handler ( str_note  ,
param1  ,
param2   
)

Definition at line 482 of file animation_shared.gsc.

Referenced by handle_notetracks().

◆ cracks_off()

function cracks_off ( str_type  )

Definition at line 600 of file animation_shared.gsc.

References CF_CRACKS_ALL, CF_CRACKS_BLUE, CF_CRACKS_GREEN, CF_CRACKS_RED, and set().

Referenced by setup_notetracks().

◆ cracks_on()

function cracks_on ( str_type  )

Definition at line 581 of file animation_shared.gsc.

References CF_CRACKS_ALL, CF_CRACKS_BLUE, CF_CRACKS_GREEN, CF_CRACKS_RED, and set().

Referenced by setup_notetracks().

◆ detach_weapon()

function detach_weapon ( weaponObject  ,
tag  = "tag_weapon_right" 
)

Definition at line 694 of file animation_shared.gsc.

References gun_remove(), and is_valid_weapon().

Referenced by cSceneObject::_prepare(), attach_weapon(), and setup_notetracks().

◆ enable_headlook()

function enable_headlook ( b_on  = true)

Definition at line 619 of file animation_shared.gsc.

References LookAtEntity().

Referenced by setup_notetracks().

◆ enable_headlook_notorso()

function enable_headlook_notorso ( b_on  = true)

Definition at line 634 of file animation_shared.gsc.

References LookAtEntity().

Referenced by setup_notetracks().

◆ fire_weapon()

function fire_weapon ( )

Definition at line 718 of file animation_shared.gsc.

Referenced by setup_notetracks(), and target_lase_override().

◆ first_frame()

function first_frame ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag   
)

Description:
"Function Name: first_frame( <animation>, [v_origin_or_ent], [v_angles_or_tag] )"
"Summary: Puts the animating models or AI or vehicles into the first frame of the animation" "Module: Animation" "CallOn: The entity to animate."
"Mandatory Argument(s): <animation> The animation to first-frame."
"Optional Argument(s): [v_origin_or_ent] The origin or entity to align the animation to."
"Optional Argument(s): [v_angles_or_tag] Option tag to align the animation to."
"Example:ai animation::first_frame( "rappel_animation" );"

Definition at line 36 of file animation_shared.gsc.

References play().

◆ handle_notetracks()

function handle_notetracks ( animation  )

Definition at line 558 of file animation_shared.gsc.

References call_notetrack_handler().

Referenced by _play().

◆ is_valid_weapon()

function is_valid_weapon ( weaponObject  )

Definition at line 649 of file animation_shared.gsc.

Referenced by attach_weapon(), and detach_weapon().

◆ last_frame()

function last_frame ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag   
)

Description:
"Function Name: last_frame( <animation>, [v_origin_or_ent], [v_angles_or_tag] )"
"Summary: Puts the animating models or AI or vehicles into the last frame of the animation" "Module: Animation" "CallOn: The entity to animate."
"Mandatory Argument(s): <animation> The animation to last-frame."
"Optional Argument(s): [v_origin_or_ent] The origin or entity to align the animation to."
"Optional Argument(s): [v_angles_or_tag] Option tag to align the animation to."
"Example:ai animation::last_frame( "rappel_animation" );"

Definition at line 52 of file animation_shared.gsc.

References play().

◆ play()

function play ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
n_rate  = 1,
n_blend_in  = .2,
n_blend_out  = .2,
n_lerp  = 0,
n_start_time  = 0,
b_show_player_firstperson_weapon  = false,
b_unlink_after_completed  = true 
)

Description:
"Function Name: play( <animation>, [v_origin_or_ent], [v_angles_or_tag], [n_rate], [n_blend_in], [n_blend_out], [n_lerp] )"
"Summary: Plays an animation" "Module: Animation" "CallOn: The entity to animate."
"Mandatory Argument(s): <animation> The animation to play."
"Optional Argument(s): [v_origin_or_ent] The origin or entity to align the animation to."
"Optional Argument(s): [v_angles_or_tag] Option tag to align the animation to."
"Optional Argument(s): [n_rate] Rate scalar for animation speed (.5 for half speed, 4 for super speed)."
"Optional Argument(s): [n_blend_in] Blend In Time."
"Optional Argument(s): [n_blend_out] Blend Out Time."
"Optional Argument(s): [n_lerp] Lerp position over time to smooth out animation."
"Optional Argument(s): [n_start_time] Time to start the animation at [0-1]."
"Optional Argument(s): [b_show_player_firstperson_weapon] Only applies to players. Determines if the player weapon should be visible in first person cinematic"

"Optional Argument(s): [b_unlink_after_completed] Unlink the entity from the linked entity when the animatio is done (default: true)"
"Example:ai animation::play( "rappel_animation" );"
"Single Player / Multi Player: singleplayer"

Definition at line 76 of file animation_shared.gsc.

References _play().

Referenced by _do_death_anim(), first_frame(), and last_frame().

◆ reach()

function reach ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
b_disable_arrivals  = false 
)

Definition at line 335 of file animation_shared.gsc.

References _reach().

Referenced by cSceneObject::_play_anim(), and get_in().

◆ set_death_anim()

function set_death_anim ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
n_rate  ,
n_blend_in  ,
n_blend_out  ,
n_lerp   
)

Description:
"Function Name: set_death_anim( <animation>, [v_origin_or_ent], [v_angles_or_tag], [n_rate], [n_blend_in], [n_blend_out], [n_lerp] )"
"Summary: Plays an animation on death. Only use on AI." "Module: Animation" "CallOn: The entity to animate."
"Mandatory Argument(s): <animation> The animation to play."
"Optional Argument(s): [v_origin_or_ent] The origin or entity to align the animation to."
"Optional Argument(s): [v_angles_or_tag] Option tag to align the animation to."
"Optional Argument(s): [n_rate] Rate scalar for animation speed (.5 for half speed, 4 for super speed)."
"Optional Argument(s): [n_blend_in] Blend In Time."
"Optional Argument(s): [n_blend_out] Blend Out Time."
"Optional Argument(s): [n_lerp] Lerp position over time to smooth out animation."
"Example:\nai animation::set_death_anim( "death_animation" );"
"Single Player / Multi Player: singleplayer"

Definition at line 423 of file animation_shared.gsc.

References _do_death_anim().

Referenced by exit_ground(), exit_low(), exit_variable(), get_in(), get_out(), and handle_rider_death().

◆ set_player_clamps()

function set_player_clamps ( )

Definition at line 449 of file animation_shared.gsc.

References IS_TRUE.

Referenced by _play().

◆ setup_notetracks()

◆ stop()

function stop ( n_blend  = 0.2)

Description:
"Function Name: stop( [n_blend_out] )"
"Summary: stops an animation" "Module: Animation" "CallOn: The entity to animate."
"Optional Argument(s): [n_blend_out] Blend Out Time."
"Example:ai animation::stop();"

Definition at line 97 of file animation_shared.gsc.

References clear().

Referenced by CodeCallback_ServerSceneStop(), console_blue(), console_green(), console_red(), destroy_gravity_trap_spikes_in_ground(), end_and_clean_patrol_behaviors(), heli_fly(), heli_protect(), set_goal_pos(), stopEpicTauntScene(), target_death_watch(), thrasherStopConsumePlayerScene(), update_character_animation_and_attachments(), and zombie_lift().

◆ teleport()

function teleport ( animation  ,
v_origin_or_ent  ,
v_angles_or_tag  ,
time   
)

Description:
"Function Name: teleport( <ents>, <scene>, <str_tag>, <animname_override> )"
"Summary: Makes an AI move to the position to start an animation." "Module: Animation" "CallOn: The root entity that is the point of relativity for the scene, be it node, ai, vehicle, etc."
"Mandatory Argument(s): <ents> entities that will move."
"Mandatory Argument(s): <scene> The animation scene name."
"Optional Argument(s): <str_tag> The str_tag to animate relative to (must exist in the entity this function is called on)."
"Optional Argument(s): <animname_override> Animname to use instead of ent.animname"
"Example:node teleport( boat, "float_by_the_dock" );"
"Single Player / Multi Player: singleplayer"

Definition at line 311 of file animation_shared.gsc.

References _get_align_pos().

Referenced by window_notetracks().