![]() |
Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
|
Go to the source code of this file.
Macros | |
#define | MAX_OCCUPY_NO_TARGET_TIME 3600 |
#define | NEARBY_DISTANCE_SQ SQR( 300 ) |
#define | NEARBY_DISTANCE_Z 60 |
#define | NEARBY_ENEMY_TIME 1000 |
#define | TURRET_LOSE_SIGHT_TIME 3000 |
#define | TURRET_TRACE_OFFSET 50 |
Functions | |
function | __init__ () |
function | _burst_fire (n_max_time, n_index) |
function | _check_for_paused (n_index) |
function | _debug_turret_think (n_index) |
function | _did_turret_lose_target (n_time_now) |
function | _drop_turret (n_index, bExitIfAutomatedOnly) |
function | _get_any_priority_targets (n_index) |
function | _get_best_target_bullet (a_potential_targets, n_index) |
function | _get_best_target_from_potential (a_potential_targets, n_index) |
function | _get_best_target_gas (a_potential_targets, n_index) |
function | _get_best_target_grenade (a_potential_targets, n_index) |
function | _get_best_target_projectile (a_potential_targets, n_index) |
function | _get_burst_fire_time (n_index) |
function | _get_burst_wait_time (n_index) |
function | _get_default_target_offset (e_target, n_index) |
function | _get_gunner_tag_for_turret_index (n_index) |
function | _get_potential_targets (n_index) |
function | _get_turret_data (n_index) |
function | _get_turret_index_for_tag (str_tag) |
function | _has_nearby_player_enemy (index, turret) |
function | _has_target_flags (n_flags, n_index) |
function | _index (n_index) |
function | _init_turret (n_index=0) |
function | _init_vehicle_turret (n_index) |
function | _is_target_within_range (e_target, s_turret) |
function | _listen_for_damage_on_actor (ai_user, n_index) |
function | _set_turret_needs_user (n_index, b_needs_user) |
function | _shoot_turret_at_target (e_target, n_time, v_offset, n_index, b_just_once) |
function | _turret_new_user_think (n_index) |
function | _turret_think (n_index, v_offset) |
function | _turret_user_think (n_index) |
function | _update_turret_arcs (n_index) |
function | _user_check (n_index) |
function | _wait_for_current_user_to_finish (n_index) |
function | _waittill_turret_on_target (e_target, n_index) |
function | _waittill_user_change (n_index) |
function | add_priority_target (ent_or_ent_array, n_index) |
function | can_hit_target (e_target, n_index) |
function | clear_ignore_ent_array (n_index) |
function | clear_target (n_index) |
function | clear_target_ent_array (n_index) |
function | disable (n_index) |
function | disable_ai_getoff (n_index, b_disable=true) |
function | does_have_target (n_index) |
function | does_have_user (n_index) |
function | does_need_user (n_index) |
function | emp_watcher (n_index) |
function | enable (n_index, b_user_required, v_offset) |
function | enable_auto_use (b_enable=true) |
function | enable_emp (b_enable, n_index) |
function | enable_laser (b_enable, n_index) |
function | fire (n_index) |
function | fire_for_time (n_time, n_index=0) |
function | get_parent (n_index) |
function | get_target (n_index) |
function | get_team (n_index) |
function | get_user (n_index) |
function | get_weapon (n_index=0) |
function | has_turret (n_index) |
function | is_current_user (ai_user, n_index) |
function | is_target (e_target, n_index) |
function | is_target_in_view (v_target, n_index) |
function | is_turret_enabled (n_index) |
function | laser_death_watcher () |
function | pause (time, n_index) |
function | set_best_target_func (func_get_best_target, n_index) |
function | set_best_target_func_from_weapon_type (n_index) |
function | set_burst_parameters (n_fire_min, n_fire_max, n_wait_min, n_wait_max, n_index) |
function | set_ignore_ent_array (a_ents, n_index) |
function | set_ignore_line_of_sight (b_ignore, n_index) |
function | set_max_target_distance (n_distance, n_index) |
function | set_min_target_distance (n_distance, n_index) |
function | set_min_target_distance_squared (n_distance_squared, n_index) |
function | set_occupy_no_target_time (time, n_index) |
function | set_on_target_angle (n_angle, n_index) |
function | set_target (e_target, v_offset, n_index) |
function | set_target_ent_array (a_ents, n_index) |
function | set_target_flags (n_flags, n_index) |
function | set_target_leading (n_index, n_target_leading_factor=0.1) |
function | set_team (str_team, n_index) |
function | set_torso_targetting (n_index, n_torso_targetting_offset=(-12)) |
function | shoot_at_target (e_target, n_time, v_offset, n_index, b_just_once) |
function | shoot_at_target_once (e_target, v_offset, n_index) |
function | stop (n_index, b_clear_target=false) |
function | toggle_lensflare (bool) |
function | trace_test (e_target, v_offset=(0, 0, 0), n_index) |
function | track_lens_flare () |
function | unpause (n_index) |
function | watch_for_flash () |
function | watch_for_flash_and_stun (n_index) |
#define MAX_OCCUPY_NO_TARGET_TIME 3600 |
Definition at line 211 of file turret_shared.gsc.
#define NEARBY_DISTANCE_SQ SQR( 300 ) |
Definition at line 1360 of file turret_shared.gsc.
#define NEARBY_DISTANCE_Z 60 |
Definition at line 1361 of file turret_shared.gsc.
#define NEARBY_ENEMY_TIME 1000 |
Definition at line 1362 of file turret_shared.gsc.
#define TURRET_LOSE_SIGHT_TIME 3000 |
Definition at line 1231 of file turret_shared.gsc.
#define TURRET_TRACE_OFFSET 50 |
Description:
"Function Name: can_turret_shoot_target( e_target, n_index )"
"Summary: Basically is there anythinhg blocking the turrets shot (geo etc..)"
"Mandatory Argument(s): <e_target> Target the Turret wats to fire at"
"Optional Argument(s): [v_offset] Optional offset"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:vh_heli can_turret_shoot_target( e_guy, 1 );"
Definition at line 2533 of file turret_shared.gsc.
function __init__ | ( | ) |
Definition at line 213 of file turret_shared.gsc.
References register(), and VERSION_SHIP.
function _burst_fire | ( | n_max_time | , |
n_index | |||
) |
Definition at line 1958 of file turret_shared.gsc.
References _get_burst_fire_time(), _get_burst_wait_time(), _get_turret_data(), fire(), and get_weapon().
Referenced by fire_for_time().
function _check_for_paused | ( | n_index | ) |
Definition at line 1498 of file turret_shared.gsc.
References _get_turret_data(), and WAIT_SERVER_FRAME.
Referenced by _turret_think().
function _debug_turret_think | ( | n_index | ) |
Definition at line 1640 of file turret_shared.gsc.
References _get_turret_data(), _index(), does_have_user(), does_need_user(), e_target, get_target(), and get_team().
Referenced by _turret_think().
function _did_turret_lose_target | ( | n_time_now | ) |
Definition at line 1406 of file turret_shared.gsc.
References IS_TRUE, and TURRET_LOSE_SIGHT_TIME.
Referenced by _turret_think().
function _drop_turret | ( | n_index | , |
bExitIfAutomatedOnly | |||
) |
Definition at line 1524 of file turret_shared.gsc.
References get_out(), get_user(), and IS_TRUE.
Referenced by _turret_think(), and disable().
function _get_any_priority_targets | ( | n_index | ) |
Definition at line 2297 of file turret_shared.gsc.
References _get_turret_data(), e_target, and is_dead_sentient().
Referenced by _get_potential_targets().
function _get_best_target_bullet | ( | a_potential_targets | , |
n_index | |||
) |
Definition at line 2371 of file turret_shared.gsc.
References can_hit_target().
Referenced by _get_best_target_gas(), _get_best_target_grenade(), _get_best_target_projectile(), and set_best_target_func_from_weapon_type().
function _get_best_target_from_potential | ( | a_potential_targets | , |
n_index | |||
) |
Definition at line 2365 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _turret_think().
function _get_best_target_gas | ( | a_potential_targets | , |
n_index | |||
) |
Definition at line 2396 of file turret_shared.gsc.
References _get_best_target_bullet().
Referenced by set_best_target_func_from_weapon_type().
function _get_best_target_grenade | ( | a_potential_targets | , |
n_index | |||
) |
Definition at line 2402 of file turret_shared.gsc.
References _get_best_target_bullet().
Referenced by set_best_target_func_from_weapon_type().
function _get_best_target_projectile | ( | a_potential_targets | , |
n_index | |||
) |
Definition at line 2408 of file turret_shared.gsc.
References _get_best_target_bullet().
Referenced by set_best_target_func_from_weapon_type().
function _get_burst_fire_time | ( | n_index | ) |
Definition at line 2021 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _burst_fire().
function _get_burst_wait_time | ( | n_index | ) |
Definition at line 2052 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _burst_fire().
function _get_default_target_offset | ( | e_target | , |
n_index | |||
) |
Definition at line 703 of file turret_shared.gsc.
References _get_turret_data(), DEFAULT, e_target, IS_EQUAL, and VAL.
Referenced by _get_best_target_quadtank_side_turret(), can_hit_target(), and set_target().
function _get_gunner_tag_for_turret_index | ( | n_index | ) |
Definition at line 2677 of file turret_shared.gsc.
Referenced by _init_vehicle_turret().
function _get_potential_targets | ( | n_index | ) |
Definition at line 2093 of file turret_shared.gsc.
References _get_any_priority_targets(), _get_turret_data(), _has_target_flags(), _is_target_within_range(), e_target, get_team(), is_dead_sentient(), IS_TRUE, TURRET_TARGET_AI, TURRET_TARGET_DRONES, TURRET_TARGET_PLAYERS, and TURRET_TARGET_VEHICLES.
Referenced by _turret_think().
function _get_turret_data | ( | n_index | ) |
Definition at line 1725 of file turret_shared.gsc.
References _init_turret().
Referenced by _burst_fire(), _check_for_paused(), _debug_turret_think(), _get_any_priority_targets(), _get_best_target_from_potential(), _get_best_target_quadtank_side_turret(), _get_burst_fire_time(), _get_burst_wait_time(), _get_default_target_offset(), _get_potential_targets(), _has_target_flags(), _listen_for_damage_on_actor(), _set_turret_needs_user(), _turret_new_user_think(), _turret_think(), _turret_user_think(), _update_turret_arcs(), _user_check(), add_priority_target(), can_hit_target(), clear_ignore_ent_array(), clear_target(), clear_target_ent_array(), disable(), disable_ai_getoff(), does_have_target(), does_need_user(), emp_watcher(), enable(), enable_emp(), enable_laser(), fire(), get_parent(), get_target(), get_team(), is_target_in_view(), is_turret_enabled(), pause(), set_best_target_func(), set_best_target_func_from_weapon_type(), set_burst_parameters(), set_ignore_ent_array(), set_ignore_line_of_sight(), set_max_target_distance(), set_min_target_distance(), set_min_target_distance_squared(), set_occupy_no_target_time(), set_on_target_angle(), set_target(), set_target_ent_array(), set_target_flags(), set_target_leading(), set_team(), set_torso_targetting(), shoot_at_target(), side_turret_is_target_in_view_score(), stop(), trace_test(), TurretScanning(), and unpause().
function _get_turret_index_for_tag | ( | str_tag | ) |
Definition at line 2689 of file turret_shared.gsc.
function _has_nearby_player_enemy | ( | index | , |
turret | |||
) |
Definition at line 1363 of file turret_shared.gsc.
References get_user(), NEARBY_DISTANCE_SQ, NEARBY_DISTANCE_Z, and NEARBY_ENEMY_TIME.
Referenced by _turret_think().
function _has_target_flags | ( | n_flags | , |
n_index | |||
) |
Definition at line 825 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _get_potential_targets().
function _index | ( | n_index | ) |
Definition at line 2083 of file turret_shared.gsc.
References STR.
Referenced by _debug_turret_think(), _listen_for_damage_on_actor(), _shoot_turret_at_target(), _turret_new_user_think(), _turret_think(), _turret_user_think(), _waittill_user_change(), disable(), enable(), fire_for_time(), and stop().
function _init_turret | ( | n_index | = 0 | ) |
Definition at line 1773 of file turret_shared.gsc.
References _init_vehicle_turret(), _update_turret_arcs(), get_weapon(), init(), set_best_target_func_from_weapon_type(), set_on_target_angle(), TURRET_TARGET_AI, TURRET_TARGET_PLAYERS, and waittill_asset_loaded().
Referenced by _get_turret_data(), hunter_initialize(), and quadtank_initialize().
function _init_vehicle_turret | ( | n_index | ) |
Definition at line 1882 of file turret_shared.gsc.
References _get_gunner_tag_for_turret_index(), _set_turret_needs_user(), and IS_HELICOPTER.
Referenced by _init_turret().
function _is_target_within_range | ( | e_target | , |
s_turret | |||
) |
Definition at line 2278 of file turret_shared.gsc.
Referenced by _get_potential_targets().
function _listen_for_damage_on_actor | ( | ai_user | , |
n_index | |||
) |
Definition at line 1454 of file turret_shared.gsc.
References _get_turret_data(), and _index().
Referenced by _turret_user_think().
function _set_turret_needs_user | ( | n_index | , |
b_needs_user | |||
) |
Definition at line 452 of file turret_shared.gsc.
References _get_turret_data(), and watch_for_flash_and_stun().
Referenced by _init_vehicle_turret(), and enable().
function _shoot_turret_at_target | ( | e_target | , |
n_time | , | ||
v_offset | , | ||
n_index | , | ||
b_just_once | |||
) |
Definition at line 1026 of file turret_shared.gsc.
References _index(), _waittill_turret_on_target(), e_target, fire(), fire_for_time(), and set_target().
Referenced by _turret_think(), and shoot_at_target().
function _turret_new_user_think | ( | n_index | ) |
Definition at line 1534 of file turret_shared.gsc.
References _get_turret_data(), _index(), _user_check(), can_get_in(), does_have_target(), get(), get_in(), get_team(), and IS_TRUE.
Referenced by _turret_think().
function _turret_think | ( | n_index | , |
v_offset | |||
) |
Definition at line 1234 of file turret_shared.gsc.
References _check_for_paused(), _debug_turret_think(), _did_turret_lose_target(), _drop_turret(), _get_best_target_from_potential(), _get_potential_targets(), _get_turret_data(), _has_nearby_player_enemy(), _index(), _shoot_turret_at_target(), _turret_new_user_think(), _turret_user_think(), _user_check(), clear_target(), emped(), get_weapon(), IS_TRUE, MAX_OCCUPY_NO_TARGET_TIME, stop(), and wait_till_clear().
Referenced by enable().
function _turret_user_think | ( | n_index | ) |
Definition at line 1420 of file turret_shared.gsc.
References _get_turret_data(), _index(), _listen_for_damage_on_actor(), _user_check(), _waittill_user_change(), and stop().
Referenced by _turret_think().
function _update_turret_arcs | ( | n_index | ) |
Definition at line 1826 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _init_turret(), and is_target_in_view().
function _user_check | ( | n_index | ) |
Definition at line 1623 of file turret_shared.gsc.
References _get_turret_data(), does_have_user(), and does_need_user().
Referenced by _turret_new_user_think(), _turret_think(), and _turret_user_think().
function _wait_for_current_user_to_finish | ( | n_index | ) |
Definition at line 570 of file turret_shared.gsc.
References get_user().
function _waittill_turret_on_target | ( | e_target | , |
n_index | |||
) |
Definition at line 1064 of file turret_shared.gsc.
References can_hit_target(), e_target, and VAL.
Referenced by _shoot_turret_at_target().
function _waittill_user_change | ( | n_index | ) |
Definition at line 1478 of file turret_shared.gsc.
References _index(), and waittill_either().
Referenced by _turret_user_think().
function add_priority_target | ( | ent_or_ent_array | , |
n_index | |||
) |
Description:
"Function Name: add_priority_target( ent_or_ent_array, n_index )"
"Summary: Adds a single ent or array of ents to be a priority target of a turret"
"Mandatory Argument(s): <ent_or_ent_array> The ent or array of entity targets the turret should attack"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:claw_turret add_priority_target( a_balcony_guys )"
Definition at line 496 of file turret_shared.gsc.
References _get_turret_data().
function can_hit_target | ( | e_target | , |
n_index | |||
) |
Description:
"Function Name: can_hit_target( e_target, n_index )"
"Summary: Check bothif the target is within the turrets constaraints and theres is nothing blocking a LOS"
"Mandatory Argument(s): <e_target> Target the Turret wants to fire at"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret can_hit_target( e_guy, 1 );"
Definition at line 2425 of file turret_shared.gsc.
References _get_default_target_offset(), _get_turret_data(), e_target, is_target(), is_target_in_view(), IS_TRUE, trace_test(), and VAL.
Referenced by _get_best_target_bullet(), _waittill_turret_on_target(), and side_turret_get_best_target().
function clear_ignore_ent_array | ( | n_index | ) |
Description:
"Function Name: clear_ignore_ent_array( n_index )"
"Summary: Clears the turrets target array"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:clear_ignore_ent_array();"
Definition at line 564 of file turret_shared.gsc.
References _get_turret_data().
function clear_target | ( | n_index | ) |
Description:
"Function Name: clear_target( n_index )"
"Summary: Clears turret target data for this turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret clear_target( n_index );"
Definition at line 791 of file turret_shared.gsc.
References _get_turret_data(), and clear().
Referenced by _turret_think(), disable(), get_target(), stop(), and TurretScanning().
function clear_target_ent_array | ( | n_index | ) |
Description:
"Function Name: clear_target_ent_array( n_index )"
"Summary: Clears the turrets target array"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:clear_target_ent_array();"
Definition at line 530 of file turret_shared.gsc.
References _get_turret_data().
function disable | ( | n_index | ) |
Description:
"Function Name: disable( n_index )"
"Summary: Disables the given turret, But it keeps its targetted information"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret turret::disable();"
Definition at line 1167 of file turret_shared.gsc.
References _drop_turret(), _get_turret_data(), _index(), clear_target(), and is_turret_enabled().
function disable_ai_getoff | ( | n_index | , |
b_disable | = true |
||
) |
Description:
"Function Name: disable_ai_getoff( n_index, b_disable = true )"
"Summary: Disable AIrom getting off the turret of lost sight of the player"
"CallOn: turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Optional Argument(s): [b_disable] Set to 'true' to turn on (default), 'false' to turn off"
"Example:e_turret turret::disable_ai_getoff( 1, true )"
Definition at line 1153 of file turret_shared.gsc.
References _get_turret_data().
function does_have_target | ( | n_index | ) |
Definition at line 1618 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _turret_new_user_think(), turret_laser_watch(), and TurretScanning().
function does_have_user | ( | n_index | ) |
Description:
"Function Name: does_have_user( n_index )"
"Summary: Checks to see if a turret has a user"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:if ( turret turret::does_have_user( n_index ) );"
Definition at line 432 of file turret_shared.gsc.
References get_user().
Referenced by _debug_turret_think(), and _user_check().
function does_need_user | ( | n_index | ) |
Description:
"Function Name: does_need_user( [n_index] )"
"Summary: Checks to see if a turret needs a user" "Module: Turret"
"Optional Argument(s): [n_index]: Index of the turret for a vehicle turret"
"Example:if ( does_need_user( n_index ) );"
"Single Player / Multi Player: singleplayer"
Definition at line 418 of file turret_shared.gsc.
References _get_turret_data(), and IS_TRUE.
Referenced by _debug_turret_think(), and _user_check().
function emp_watcher | ( | n_index | ) |
Definition at line 318 of file turret_shared.gsc.
References _get_turret_data(), damage(), emped(), and stop().
Referenced by enable_emp().
function enable | ( | n_index | , |
b_user_required | , | ||
v_offset | |||
) |
Description:
"Function Name: enable( n_index, b_user_required, v_offset )"
"Summary: Enables the given turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Optional Argument(s): [b_user_required] Determines if the turret require a user to fire"
"Optional Argument(s): [v_offset] Offset from the turret target"
"Example:e_turret turret::enable( 1 ); // enable gunner1"
Definition at line 1108 of file turret_shared.gsc.
References _get_turret_data(), _index(), _set_turret_needs_user(), _turret_think(), and is_turret_enabled().
function enable_auto_use | ( | b_enable | = true | ) |
Description:
"Function Name: enable_auto_use( b_enable = true )"
"Summary: Enables a vehicle to automatically get AI turret users"
"CallOn: vehicle/turret"
"Optional Argument(s): [b_enable] Set to 'false' to turn off, 'true' to turn on (default)."
"Example:vh_truck turret::enable_auto_use( true )"
Definition at line 1137 of file turret_shared.gsc.
function enable_emp | ( | b_enable | , |
n_index | |||
) |
Definition at line 356 of file turret_shared.gsc.
References _get_turret_data(), and emp_watcher().
function enable_laser | ( | b_enable | , |
n_index | |||
) |
Definition at line 260 of file turret_shared.gsc.
References _get_turret_data(), and laser_death_watcher().
Referenced by turret_laser_watch().
function fire | ( | n_index | ) |
Description:
"Function Name: fire( n_index )"
"Summary: Fires a turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret fire();"
Definition at line 889 of file turret_shared.gsc.
References _get_turret_data(), get_user(), and IS_TRUE.
Referenced by _burst_fire(), and _shoot_turret_at_target().
function fire_for_time | ( | n_time | , |
n_index | = 0 |
||
) |
Description:
"Function Name: fire_for_time( n_time , n_index )"
"Summary: Fires a turret for a time, blocks for n_time"
"Mandatory Argument(s): <n_time> The time to fire the turret for"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret fire_for_time( 3 );"
Definition at line 953 of file turret_shared.gsc.
References _burst_fire(), _index(), and get_weapon().
Referenced by _shoot_turret_at_target(), attack_minigun_sweep(), Attack_Thread_Gun(), Attack_Thread_machinegun(), Attack_Thread_MainTurret(), set_movement_and_accel(), state_stationary_update(), and turretFireUpdate().
function get_parent | ( | n_index | ) |
Description:
"Function Name: get_parent( n_index )"
"Summary: Gets a turret's parent"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:turret get_parent( n_index );"
Definition at line 244 of file turret_shared.gsc.
References _get_turret_data().
function get_target | ( | n_index | ) |
Description:
"Function Name: get_target( n_index )"
"Summary: Returns turret target data for this turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:has_target = isdefined( get_target( n_index ) );"
Definition at line 760 of file turret_shared.gsc.
References _get_turret_data(), clear_target(), e_target, and IS_TRUE.
Referenced by _debug_turret_think(), _get_best_target_quadtank_side_turret(), FindNewPosition(), is_target(), and side_turret_get_best_target().
function get_team | ( | n_index | ) |
Definition at line 379 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _debug_turret_think(), _get_potential_targets(), and _turret_new_user_think().
function get_user | ( | n_index | ) |
Description:
"Function Name: get_user( n_index )"
"Summary: Gets the user of this turret"
"Optional Argument(s): [n_index]: Index of the turret for a vehicle turret"
"Example:ai_user = turret::get_user( n_index );"
Definition at line 447 of file turret_shared.gsc.
Referenced by _drop_turret(), _has_nearby_player_enemy(), _wait_for_current_user_to_finish(), does_have_user(), fire(), and is_current_user().
function get_weapon | ( | n_index | = 0 | ) |
Description:
"Function Name: get_weapon( n_index )"
"Summary: Gets a turret's weapon"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:turret get_weapon();"
Definition at line 229 of file turret_shared.gsc.
Referenced by _burst_fire(), _init_turret(), _turret_think(), and fire_for_time().
function has_turret | ( | n_index | ) |
Definition at line 1756 of file turret_shared.gsc.
Referenced by FindNewPosition().
function is_current_user | ( | ai_user | , |
n_index | |||
) |
Description:
"Function Name: is_current_user( ai_user, n_index )"
"Summary: Checks to see if an AI is the current user"
"Mandatory Argument(s): <ai_user> The user of this turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:if ( is_current_user( ai_user, n_index ) );"
Definition at line 590 of file turret_shared.gsc.
References get_user().
function is_target | ( | e_target | , |
n_index | |||
) |
Definition at line 769 of file turret_shared.gsc.
References e_target, and get_target().
Referenced by _get_best_target_quadtank_side_turret(), and can_hit_target().
function is_target_in_view | ( | v_target | , |
n_index | |||
) |
Description:
"Function Name: is_target_in_view( v_target, n_index )"
"Summary: Gets whether a turret's target is in view"
"Mandatory Argument(s): <e_target> Target the Turret wants to fire at"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret is_target_in_view( v_position, 1 );"
Definition at line 2469 of file turret_shared.gsc.
References _get_turret_data(), and _update_turret_arcs().
Referenced by can_hit_target().
function is_turret_enabled | ( | n_index | ) |
Description:
"Function Name: is_turret_enabled( n_index )"
"Summary: Checks to see if a turret is enabled"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:if ( is_turret_enabled( n_index ) );"
Definition at line 404 of file turret_shared.gsc.
References _get_turret_data().
function laser_death_watcher | ( | ) |
Definition at line 249 of file turret_shared.gsc.
Referenced by enable_laser().
function pause | ( | time | , |
n_index | |||
) |
Description:
"Function Name: pause( time, n_index )"
"Summary: Disables the given turret, But it keeps its targetted information"
"Mandatory Argument(s): <time> Time to pause turret for, 0 for infinite"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret turret::pause( 0 );"
Definition at line 1193 of file turret_shared.gsc.
References _get_turret_data(), and stop().
Referenced by last_stand_thread().
function set_best_target_func | ( | func_get_best_target | , |
n_index | |||
) |
Description:
"Function Name: set_best_target_func( function, n_index )"
"Summary: Custom override function, scripter can use to custermise their choice from potential targets"
"Mandatory Argument(s): <function> Override target selection function"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:set_best_target_func(&_get_best_target_bullet, n_index );"
Definition at line 1871 of file turret_shared.gsc.
References _get_turret_data().
Referenced by hunter_initialize(), quadtank_initialize(), and set_best_target_func_from_weapon_type().
function set_best_target_func_from_weapon_type | ( | n_index | ) |
Definition at line 1835 of file turret_shared.gsc.
References _get_best_target_bullet(), _get_best_target_gas(), _get_best_target_grenade(), _get_best_target_projectile(), _get_turret_data(), and set_best_target_func().
Referenced by _init_turret().
function set_burst_parameters | ( | n_fire_min | , |
n_fire_max | , | ||
n_wait_min | , | ||
n_wait_max | , | ||
n_index | |||
) |
Description:
"Function Name: set_burst_parameters( n_fire_min, n_fire_max, n_wait_min, n_wait_max, n_index )"
"Summary: Sets the burst parameters for a turret"
"Mandatory Argument(s): <n_fire_min> The minimum time to fire the turret for"
"Mandatory Argument(s): <n_fire_max> The maximum time to fire the turret for"
"Mandatory Argument(s): <n_wait_min> The minimum time to wait between firing"
"Mandatory Argument(s): <n_wait_max> The maximum time to wait between firing"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:turret set_burst_parameters( 1, 2, 3, 4 ); // slow burst firing"
Definition at line 609 of file turret_shared.gsc.
References _get_turret_data().
Referenced by hunter_initialize(), and quadtank_update_difficulty().
function set_ignore_ent_array | ( | a_ents | , |
n_index | |||
) |
Description:
"Function Name: set_ignore_ent_array( a_ents, n_index )"
"Summary: Sends a list of targets for the turret to ignore."
"Mandatory Argument(s): <a_ents> The Array of Targets you want the turret to IGNORE"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:set_ignore_ent_array( a_ents );"
Definition at line 548 of file turret_shared.gsc.
References _get_turret_data(), and a_ents.
function set_ignore_line_of_sight | ( | b_ignore | , |
n_index | |||
) |
Description:
"Function Name: set_ignore_line_of_sight( b_ignore, n_index )"
"Summary: Set whether a turret will ignore line of sight or not"
"Mandatory Argument(s): <b_ignore> bool to ignore line of sight or not"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret set_ignore_line_of_sight( true, 0 );"
Definition at line 2613 of file turret_shared.gsc.
References _get_turret_data().
function set_max_target_distance | ( | n_distance | , |
n_index | |||
) |
Description:
"Function Name: set_max_target_distance( n_distance )"
"Summary: Sets the maximum distance a target can be, ( NOTE: 0 or undefined == unlimited distance)"
"Mandatory Argument(s): <n_distance> The maximum distance a target can be, ( NOTE: 0 or undefined == unlimited distance )"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_vehicle set_max_target_distance( 2048, 1 );"
Definition at line 842 of file turret_shared.gsc.
References _get_turret_data().
Referenced by InitTurret(), and InitTurretVehicle().
function set_min_target_distance | ( | n_distance | , |
n_index | |||
) |
Description:
"Function Name: set_min_target_distance( n_distance )"
"Summary: Sets the minimum distance a target can be"
"Mandatory Argument(s): <n_distance> The minimum distance a target can be, below which is not considered a target ( NOTE: undefined == zero distance )"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_vehicle set_min_target_distance( 18, 1 );"
Definition at line 858 of file turret_shared.gsc.
References _get_turret_data().
function set_min_target_distance_squared | ( | n_distance_squared | , |
n_index | |||
) |
Description:
"Function Name: set_min_target_distance_squared( n_distance )"
"Summary: Sets the minimum distance squared a target can be"
"Mandatory Argument(s): <n_distance> The minimum distance squared a target can be, below which is not considered a target ( NOTE: undefined == zero distance )"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_vehicle set_min_target_distance_squared( DistanceSquared( e_vehicle GetTagOrigin( "tag_flash" ), e_vehicle GetTagOrigin( "tag_barrel" ) ), 0 );"
Definition at line 874 of file turret_shared.gsc.
References _get_turret_data().
Referenced by InitTurret().
function set_occupy_no_target_time | ( | time | , |
n_index | |||
) |
Description:
"Function Name: set_occupy_no_target_time( time, n_index )"
"Summary: How long an AI will stay inside a turret if there is no target, default = 2.0"
"Mandatory Argument(s): <time> time to occupy turret without a target"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret turret::set_occupy_no_target_time( 4 );"
Definition at line 2630 of file turret_shared.gsc.
References _get_turret_data().
function set_on_target_angle | ( | n_angle | , |
n_index | |||
) |
Description:
"Function Name: set_on_target_angle( n_angle, n_index )"
"Summary: Sets the angle at which the turret will be on target"
"Mandatory Argument(s): <n_angle> angle at which the turret will be on target"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:turret set_on_target_angle( 1, 5 ); // on target at 5 degrees from target position"
Definition at line 643 of file turret_shared.gsc.
References _get_turret_data().
Referenced by _init_turret(), InitTurret(), and InitTurretVehicle().
function set_target | ( | e_target | , |
v_offset | , | ||
n_index | |||
) |
Description:
"Function Name: set_target( e_target, v_offset, n_index )"
"Summary: Sets the target of this turret"
"Mandatory Argument(s): <e_target> The target of this turret"
"Optional Argument(s): [v_offset] Offset from the turret target"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret set_target( e_target, v_offset, n_index );"
Definition at line 680 of file turret_shared.gsc.
References _get_default_target_offset(), _get_turret_data(), and e_target.
Referenced by _shoot_turret_at_target().
function set_target_ent_array | ( | a_ents | , |
n_index | |||
) |
Description:
"Function Name: set_target_ent_array( a_entities, n_index )"
"Summary: Sends a list of targets for the turret. NOTE - Sends notify when targets are all dead"
"Mandatory Argument(s): <a_targets> The Array of Targets you want the turret to destroy"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:set_target_ent_array( a_ents );"
Definition at line 480 of file turret_shared.gsc.
References _get_turret_data(), and a_ents.
function set_target_flags | ( | n_flags | , |
n_index | |||
) |
Description:
"Function Name: set_target_flags( n_flags, n_index )"
"Summary: Sets the flags for the types of targets the turret should pick"
"Mandatory Argument(s): <n_flags> The types of targets - currently supports TURRET_TARGET_AI, TURRET_TARGET_PLAYERS, TURRET_TARGET_DRONES, TURRET_TARGET_VEHICLES"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_bunker_turret set_target_flags( TURRET_TARGET_AI | TURRET_TARGET_PLAYERS, n_index );"
Definition at line 819 of file turret_shared.gsc.
References _get_turret_data().
Referenced by hunter_initialize().
function set_target_leading | ( | n_index | , |
n_target_leading_factor | = 0.1 |
||
) |
Definition at line 626 of file turret_shared.gsc.
References _get_turret_data().
Referenced by OnPlaceTurret().
function set_team | ( | str_team | , |
n_index | |||
) |
Definition at line 371 of file turret_shared.gsc.
References _get_turret_data().
Referenced by OnPlaceTurret().
function set_torso_targetting | ( | n_index | , |
n_torso_targetting_offset | = ( -12 ) |
||
) |
Definition at line 619 of file turret_shared.gsc.
References _get_turret_data().
Referenced by OnPlaceTurret().
function shoot_at_target | ( | e_target | , |
n_time | , | ||
v_offset | , | ||
n_index | , | ||
b_just_once | |||
) |
Description:
"Function Name: shoot_at_target( e_target, n_time, v_offset, n_index )"
"Summary: Fires turret at given target"
"Mandatory Argument(s): <e_target> The target of this turret"
"Mandatory Argument(s): <n_time> The time to fire the turret for"
"Optional Argument(s): [v_offset] Offset from the turret target"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Optional Argument(s): [b_just_once] Ignore the time parameter and just fire once"
"Example:self thread shoot_at_target( e_best_target, -1, undefined, n_index );"
Definition at line 1010 of file turret_shared.gsc.
References _get_turret_data(), _shoot_turret_at_target(), clear(), e_target, and set().
Referenced by shoot_at_target_once().
function shoot_at_target_once | ( | e_target | , |
v_offset | , | ||
n_index | |||
) |
Description:
"Function Name: shoot_at_target_once( e_target, v_offset, n_index )"
"Summary: Fires turret at given target once"
"Mandatory Argument(s): <e_target> The target of this turret"
"Optional Argument(s): [v_offset] Offset from the turret target"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:self thread shoot_at_target_once( e_best_target, undefined, n_index );"
Definition at line 1092 of file turret_shared.gsc.
References e_target, and shoot_at_target().
function stop | ( | n_index | , |
b_clear_target | = false |
||
) |
Description:
"Function Name: stop( n_index, b_clear_target )"
"Summary: Stops a turret"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Optional Argument(s): [b_clear_target] Clears the turret target. default true."
"Example:e_turret stop();"
Definition at line 926 of file turret_shared.gsc.
References _get_turret_data(), _index(), clear(), and clear_target().
Referenced by _turret_think(), _turret_user_think(), emp_watcher(), pause(), and watch_for_flash_and_stun().
function toggle_lensflare | ( | bool | ) |
Definition at line 2637 of file turret_shared.gsc.
References set().
Referenced by state_death_update(), and track_lens_flare().
function trace_test | ( | e_target | , |
v_offset | = (0,0,0) , |
||
n_index | |||
) |
Definition at line 2535 of file turret_shared.gsc.
References _get_turret_data(), e_target, and TURRET_TRACE_OFFSET.
Referenced by _get_best_target_quadtank_side_turret(), and can_hit_target().
function track_lens_flare | ( | ) |
Definition at line 2642 of file turret_shared.gsc.
References e_target, toggle_lensflare(), waittill_player_looking_at(), and waittill_player_not_looking_at().
Referenced by turret_initialze().
function unpause | ( | n_index | ) |
Description:
"Function Name: unpause( n_index )"
"Summary: Disables the given turret, But it keeps its targetted information"
"Optional Argument(s): [n_index] Index of the turret for a vehicle turret"
"Example:e_turret turret::unpause();"
Definition at line 1225 of file turret_shared.gsc.
References _get_turret_data().
function watch_for_flash | ( | ) |
Definition at line 276 of file turret_shared.gsc.
Referenced by watch_for_flash_and_stun().
function watch_for_flash_and_stun | ( | n_index | ) |
Definition at line 288 of file turret_shared.gsc.
References damage(), stop(), and watch_for_flash().
Referenced by _set_turret_needs_user().