![]() |
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 | ANIMTREE "generic" |
#define | MAX_AMBIENT_ANIM_GROUPS 3 |
#define | MAX_LIGHTFX_GROUPS 3 |
Functions | |
function | __init__ () |
function | __main__ () |
function | _disconnect_paths_when_stopped () |
function | _play_looped_fx_on_tag_origin_update (tag, effectorigin) |
function | _remove_non_riders_from_array (ai) |
function | _scripted_spawn (group) |
function | _scripted_spawn_go (group) |
function | _spawn_array (spawners) |
function | _spawn_group (spawngroup) |
function | _spline_debug () |
function | _vehicle_bad_place () |
function | _vehicle_life () |
function | _vehicle_load_assets () |
function | _vehicle_spawn (vspawner, from) |
function private | _watch_for_hijacked_vehicles () |
function | add_hijack_function (veh_targetname, spawn_func, param1, param2, param3, param4) |
function | add_proccess_trigger (trigger) |
function | add_spawn_function (veh_targetname, spawn_func, param1, param2, param3, param4) |
function | add_spawn_function_by_type (veh_type, spawn_func, param1, param2, param3, param4) |
function | add_to_target_group (target_ent) |
function | ai_should_be_added (ai) |
function | aircraft_dust_kickup (model) |
function | array_2d_add (array, firstelem, newelem) |
function | attacker_is_on_my_team (attacker) |
function | attacker_troop_is_on_my_team (attacker) |
function | build_drive (forward, reverse, normalspeed, rate) |
function | bullet_shielded (type) |
function | connect_paths () |
function | crash_derailed_check (detourpath) |
function | crash_detour_check (detourpath) |
function | create_from_spawngroup_and_go_path (spawnGroup) |
function | debug_set_speed (speed, rate, msg) |
function | detach_getoutrigs () |
function | detach_path () |
function | disconnect_paths (detail_level=2, move_allowed=true) |
function | do_death_dynents (special_status=1) |
function | do_death_fx () |
function | do_gib_dynents () |
function | enable_auto_disconnect_path () |
function | enable_turrets (veh) |
function | friendly_fire_shield () |
function | friendly_fire_shield_callback (attacker, amount, type) |
function | get_closest_attacker_with_missile_locked_on_to_me (monitored_entity) |
function | get_normal_anim_time (animation) |
function | get_off_path () |
function | get_on_and_go_path (path_start) |
function | get_on_path (path_start, str_key="targetname") |
function | get_vehiclenode_any_dynamic (target) |
function | go_path () |
function | god_off () |
function | god_on () |
function | has_helicopter_dust_kickup () |
function | impact_fx (fxname, surfaceTypes) |
function | init (vehicle) |
function | init_target_group () |
function | is_cheap () |
function | is_corpse (veh) |
function | is_node_script_origin (pathnode) |
function | is_node_script_struct (node) |
function | is_on (vehicle) |
function | is_unload_node () |
function | islastnode (node) |
function | kill_vehicle (attacker) |
function | land () |
function | levelstuff (vehicle) |
function | liftoff (height) |
function | lights_off () |
function | lights_on (team) |
function | maingun_fx () |
function | monitor_damage_as_occupant (player) |
function | monitor_missiles_locked_on_to_me (player, wait_time=0.1) |
function | node_trigger_process () |
function | path_detour (node) |
function | path_detour_get_detourpath (detournode) |
function | path_detour_script_origin (detournode) |
function | path_gate_open (node) |
function | path_gate_wait_till_open (pathspot) |
function | paths (node) |
function | pause_path () |
function | play_looped_fx_on_tag (effect, durration, tag) |
function | player_is_driver () |
function | print_debug_info (str_info) |
function | print_resume_speed (timer) |
function | remove_from_target_group (target_ent) |
function | resume_path () |
function | resume_path_vehicle () |
function | rider_walk_setup (vehicle) |
function | script_resume_speed (msg, rate) |
function | set_alert_fx_level (alert_level) |
function | set_damage_fx_level (damage_level) |
function | set_goal_pos (origin, bStop) |
function | set_speed (speed, rate, msg) |
function | set_variables (vehicle) |
function | set_vehicle_drivable_time (duration_ms, end_time_ms) |
function | set_vehicle_drivable_time_starting_now (duration_ms) |
function | setup_dvars () |
function | setup_dynamic_detour (pathnode, get_func) |
function | setup_groundnode_detour (node) |
function | setup_level_vars () |
function | setup_nodes () |
function | setup_script_gatetrigger (trigger) |
function | setup_spawners (a_veh_spawners) |
function | setup_targetname_spawners () |
function | setup_triggers () |
function | should_update_damage_fx_level (currentHealth, damage, maxHealth) |
function | show_node_debug_info () |
function | simple_spawn (name, b_supress_assert=false) |
function | simple_spawn_and_drive (name) |
function | simple_spawn_single (name, b_supress_assert=false) |
function | simple_spawn_single_and_drive (name) |
function | sort_by_startingpos (guysarray) |
function | spawn (modelname, targetname, vehicletype, origin, angles, destructibledef) |
function | spline_debug () |
function | stop_monitor_damage_as_occupant () |
function | stop_monitor_missiles_locked_on_to_me () |
function | toggle_ambient_anim_group (groupID, on) |
function | toggle_burn_fx (on) |
function | toggle_emp_fx (on) |
function | toggle_exhaust_fx (on) |
function | toggle_lights_group (groupID, on) |
function | toggle_sounds (on) |
function | toggle_tread_fx (on) |
function | trigger_process (trigger) |
function | unload_node (node) |
function | unload_node_helicopter (node) |
function | update_damage_as_occupant (damage_taken, max_health) |
function | update_damage_fx_level (currentHealth, damage, maxHealth) |
function | vehicle_spawner_tool () |
function | wait_till_stable () |
#define ANIMTREE "generic" |
Definition at line 24 of file vehicle_shared.gsc.
#define MAX_AMBIENT_ANIM_GROUPS 3 |
Definition at line 22 of file vehicle_shared.gsc.
#define MAX_LIGHTFX_GROUPS 3 |
Definition at line 21 of file vehicle_shared.gsc.
function __init__ | ( | ) |
Definition at line 73 of file vehicle_shared.gsc.
References _watch_for_hijacked_vehicles(), register(), setup_dvars(), setup_level_vars(), setup_nodes(), setup_targetname_spawners(), setup_triggers(), trigger_process(), and VERSION_SHIP.
function __main__ | ( | ) |
Definition at line 165 of file vehicle_shared.gsc.
References setup_spawners().
function _disconnect_paths_when_stopped | ( | ) |
Definition at line 1499 of file vehicle_shared.gsc.
References connect_paths(), disconnect_paths(), and SQR.
Referenced by enable_auto_disconnect_path(), and init().
function _play_looped_fx_on_tag_origin_update | ( | tag | , |
effectorigin | |||
) |
Definition at line 2008 of file vehicle_shared.gsc.
Referenced by play_looped_fx_on_tag().
function _remove_non_riders_from_array | ( | ai | ) |
Definition at line 445 of file vehicle_shared.gsc.
References ai_should_be_added().
Referenced by _spawn_array().
function _scripted_spawn | ( | group | ) |
Description:
"Function Name: _scripted_spawn( <group> )"
"Summary: spawns and returns a vehiclegroup, you will need to tell it to vehicle::go_path() when you want it to go" "Module: Vehicle" "CallOn: An entity"
"Mandatory Argument(s): <group> : "
"Example:bmps = _scripted_spawn( 32 );"
"Single Player / Multi Player: singleplayer"
Definition at line 1144 of file vehicle_shared.gsc.
References _scripted_spawn_go().
Referenced by create_from_spawngroup_and_go_path(), and simple_spawn().
function _scripted_spawn_go | ( | group | ) |
Definition at line 1151 of file vehicle_shared.gsc.
Referenced by _scripted_spawn().
function _spawn_array | ( | spawners | ) |
Definition at line 439 of file vehicle_shared.gsc.
References _remove_non_riders_from_array(), and simple_spawn().
function _spawn_group | ( | spawngroup | ) |
Definition at line 1112 of file vehicle_shared.gsc.
References _vehicle_spawn().
Referenced by setup_spawners().
function _spline_debug | ( | ) |
Definition at line 3911 of file vehicle_shared.gsc.
References show_node_debug_info(), and wait_till().
Referenced by spline_debug().
function _vehicle_bad_place | ( | ) |
Definition at line 2249 of file vehicle_shared.gsc.
Referenced by init().
function _vehicle_life | ( | ) |
Definition at line 1921 of file vehicle_shared.gsc.
Referenced by init().
function _vehicle_load_assets | ( | ) |
Definition at line 1957 of file vehicle_shared.gsc.
function _vehicle_spawn | ( | vspawner | , |
from | |||
) |
Definition at line 1169 of file vehicle_shared.gsc.
References global_spawn_throttle(), and MAX_SPAWNED_PER_FRAME.
Referenced by _spawn_group().
function private _watch_for_hijacked_vehicles | ( | ) |
Definition at line 3549 of file vehicle_shared.gsc.
References single_thread().
Referenced by __init__().
function add_hijack_function | ( | veh_targetname | , |
spawn_func | , | ||
param1 | , | ||
param2 | , | ||
param3 | , | ||
param4 | |||
) |
Description:
"Function Name: add_hijack_function( <targetname>, <func> , <param1> , <param2> , <param3>, <param4> )"
"Summary: Runs when a vehicle gets hijacked/hacked with 'security breach'."
"Mandatory Argument(s): <targetname> : The targetname of the vehicle."
"Mandatory Argument(s): <func1> : The function to run."
"Optional Argument(s): <param1> : An optional parameter."
"Optional Argument(s): <param2> : An optional parameter."
"Optional Argument(s): <param3> : An optional parameter."
"Optional Argument(s): <param4> : An optional parameter."
"Example:vehicle::add_hijack_function( "amazing_vehicle", &do_the_amazing_thing, some_amazing_parameter );" "Note: This function must be called before load::main"
Definition at line 3535 of file vehicle_shared.gsc.
function add_proccess_trigger | ( | trigger | ) |
Definition at line 541 of file vehicle_shared.gsc.
References ARRAY_ADD.
Referenced by node_trigger_process(), and setup_groundnode_detour().
function add_spawn_function | ( | veh_targetname | , |
spawn_func | , | ||
param1 | , | ||
param2 | , | ||
param3 | , | ||
param4 | |||
) |
Description:
"Function Name: add_spawn_function( <targetname>, <func> , <param1> , <param2> , <param3>, <param4> )"
"Summary: Anything that spawns from this spawner will run this function. Anything."
"Mandatory Argument(s): <targetname> : The targetname of the vehicle."
"Mandatory Argument(s): <func1> : The function to run."
"Optional Argument(s): <param1> : An optional parameter."
"Optional Argument(s): <param2> : An optional parameter."
"Optional Argument(s): <param3> : An optional parameter."
"Optional Argument(s): <param4> : An optional parameter."
"Example:vehicle::add_spawn_function( "amazing_vehicle",&do_the_amazing_thing, some_amazing_parameter );" "Note: This function must be called before load::main"
Definition at line 3481 of file vehicle_shared.gsc.
function add_spawn_function_by_type | ( | veh_type | , |
spawn_func | , | ||
param1 | , | ||
param2 | , | ||
param3 | , | ||
param4 | |||
) |
Description:
"Function Name: add_spawn_function_by_type( <vehicle_type>, <func> , <param1> , <param2> , <param3>, <param4> )"
"Summary: Anything that spawns from this spawner will run this function. Anything."
"Mandatory Argument(s): <vehicle_type> : The .vehicletype of the vehicle."
"Mandatory Argument(s): <func1> : The function to run."
"Optional Argument(s): <param1> : An optional parameter."
"Optional Argument(s): <param2> : An optional parameter."
"Optional Argument(s): <param3> : An optional parameter."
"Optional Argument(s): <param4> : An optional parameter."
"Example:vehicle::add_spawn_function_by_type( "tank_t72",&do_the_amazing_thing, some_amazing_parameter );" "Note: This function must be called before load::main"
Definition at line 3508 of file vehicle_shared.gsc.
function add_to_target_group | ( | target_ent | ) |
Definition at line 3603 of file vehicle_shared.gsc.
References ARRAY_ADD.
Referenced by ActivateSentinel(), ai_tank_killstreak_start(), AllowMainTurretLockon(), InitHelicopterSeat(), and SpawnDart().
function ai_should_be_added | ( | ai | ) |
Definition at line 460 of file vehicle_shared.gsc.
Referenced by _remove_non_riders_from_array().
function aircraft_dust_kickup | ( | model | ) |
function array_2d_add | ( | array | , |
firstelem | , | ||
newelem | |||
) |
Definition at line 1723 of file vehicle_shared.gsc.
References array.
Referenced by levelstuff(), and node_trigger_process().
function attacker_is_on_my_team | ( | attacker | ) |
Definition at line 2142 of file vehicle_shared.gsc.
Referenced by friendly_fire_shield_callback().
function attacker_troop_is_on_my_team | ( | attacker | ) |
Definition at line 2154 of file vehicle_shared.gsc.
Referenced by friendly_fire_shield_callback().
function build_drive | ( | forward | , |
reverse | , | ||
normalspeed | , | ||
rate | |||
) |
Description:
"Function Name: build_drive( <forward> , <reverse> , <normalspeed> , <rate> )"
"Summary: called in individual vehicle file - assigns animations to be used on vehicles" "Module: Vehicle" "CallOn: A vehicle"
"Mandatory Argument(s): <forward> : forward animation"
"Optional Argument(s): <reverse> : reverse animation"
"Optional Argument(s): <normalspeed> : speed at which animation will be played at 1x defaults to 10mph"
"Optional Argument(s): <rate> : scales speed of animation( please only use this for testing )"
"Example:vehicle build_drive( %abrams_movement, %abrams_movement_backwards, 10 );"
"Single Player / Multi Player: singleplayer"
Definition at line 3031 of file vehicle_shared.gsc.
References reverse().
function bullet_shielded | ( | type | ) |
Definition at line 2170 of file vehicle_shared.gsc.
Referenced by friendly_fire_shield_callback().
function connect_paths | ( | ) |
Description:
"Function Name: connect_paths()"
"Summary: Connects paths on a vehicle and enables its obstacle."
"Example:ent vehicle::connect_paths();"
Definition at line 3592 of file vehicle_shared.gsc.
Referenced by _disconnect_paths_when_stopped(), go_path(), OnDeath(), and OnPickupTurret().
function crash_derailed_check | ( | detourpath | ) |
Definition at line 362 of file vehicle_shared.gsc.
Referenced by path_detour().
function crash_detour_check | ( | detourpath | ) |
Definition at line 342 of file vehicle_shared.gsc.
Referenced by path_detour().
function create_from_spawngroup_and_go_path | ( | spawnGroup | ) |
Description:
"Function Name: create_from_spawngroup_and_go_path( <spawnGroup> )"
"Summary: spawns and returns and array of the vehicles in the specified spawngroup starting them on their paths" "Module: Vehicle" "CallOn: An entity"
"Mandatory Argument(s): <spawnGroup> : the script_vehiclespawngroup asigned to the vehicles in radiant"
"Example:vehicle::create_from_spawngroup_and_go_path( spawnGroup )"
"Single Player / Multi Player: singleplayer"
Definition at line 1004 of file vehicle_shared.gsc.
References _scripted_spawn(), and go_path().
function debug_set_speed | ( | speed | , |
rate | , | ||
msg | |||
) |
Definition at line 1590 of file vehicle_shared.gsc.
Referenced by set_speed().
function detach_getoutrigs | ( | ) |
Definition at line 1420 of file vehicle_shared.gsc.
function detach_path | ( | ) |
Definition at line 2538 of file vehicle_shared.gsc.
References FLAT_ANGLES.
function disconnect_paths | ( | detail_level | = 2 , |
move_allowed | = true |
||
) |
Description:
"Function Name: disconnect_paths( <detail_level> )"
"Summary: Disconnects paths on a vehicle and disables its obstacle."
"Optional Argument(s): <detail_level> : The type of bounding volume to create."
"Example:ent vehicle::disconnect_paths( detail_level );"
Definition at line 3580 of file vehicle_shared.gsc.
Referenced by _disconnect_paths_when_stopped(), death_update_crash(), get_on_path(), go_path(), init(), main(), OnPlaceEMP(), OnPlaceTurret(), and waittill_crash_done_or_stopped().
function do_death_dynents | ( | special_status | = 1 | ) |
Definition at line 2874 of file vehicle_shared.gsc.
References set().
Referenced by burning_death(), do_death_fx(), emped_death(), gibbed_death(), set_movement_and_accel(), state_death_update(), and watch_death().
function do_death_fx | ( | ) |
Definition at line 2855 of file vehicle_shared.gsc.
References set().
Referenced by croc_crash_movement(), death_fx(), and helicopter_explode().
function do_gib_dynents | ( | ) |
function enable_auto_disconnect_path | ( | ) |
Definition at line 1492 of file vehicle_shared.gsc.
References _disconnect_paths_when_stopped().
function enable_turrets | ( | veh | ) |
function friendly_fire_shield | ( | ) |
Definition at line 2194 of file vehicle_shared.gsc.
Referenced by amws_initialize(), counteruav_initialize(), dragon_initialize(), glaive_initialize(), hunter_initialize(), init(), InitFlakDrone(), InitSentinel(), parasite_initialize(), raps_initialize(), scout_drone_initialize(), sentinel_drone_initialize(), siegebot_initialize(), spider_initialize(), and wasp_initialize().
function friendly_fire_shield_callback | ( | attacker | , |
amount | , | ||
type | |||
) |
Definition at line 2204 of file vehicle_shared.gsc.
References attacker_is_on_my_team(), attacker_troop_is_on_my_team(), and bullet_shielded().
function get_closest_attacker_with_missile_locked_on_to_me | ( | monitored_entity | ) |
Definition at line 3645 of file vehicle_shared.gsc.
Referenced by monitor_missiles_locked_on_to_me().
function get_normal_anim_time | ( | animation | ) |
Definition at line 1680 of file vehicle_shared.gsc.
function get_off_path | ( | ) |
Definition at line 986 of file vehicle_shared.gsc.
function get_on_and_go_path | ( | path_start | ) |
Description:
"Function Name: get_on_and_go_path( <path_start> )" "Module: Vehicle" "CallOn: a vehicle"
"Mandatory Argument(s): <path_start> : the node, script_origin, or struct to start from"
"Summary: Attach and start the vehicle on its path."
"Example:vehicle thread vehicle::get_on_and_go_path(path_start)"
"Single Player / Multi Player: singleplayer"
Definition at line 1027 of file vehicle_shared.gsc.
References get_on_path(), and go_path().
function get_on_path | ( | path_start | , |
str_key | = "targetname" |
||
) |
Description:
"Function Name: get_on_path( <path_start>, [str_key] )" "Module: Vehicle" "CallOn: Vehicle"
"Summary: Will attach the vehicle to a path"
"Mandatory Argument(s): <path_start> : the actual start node or string name of the node"
"Optional Argument(s): [str_key] if passing in a string, the key of the node to look for."
"Example:v_jeep vehicle::get_on_path( "escape_jeep_start" );"
Definition at line 938 of file vehicle_shared.gsc.
References disconnect_paths(), IS_TRUE, and paths().
Referenced by get_on_and_go_path(), and init().
function get_vehiclenode_any_dynamic | ( | target | ) |
Definition at line 2341 of file vehicle_shared.gsc.
References get(), and IS_PLANE.
Referenced by islastnode(), and resume_path_vehicle().
function go_path | ( | ) |
Definition at line 1037 of file vehicle_shared.gsc.
References connect_paths(), disconnect_paths(), IS_TRUE, and script_delay().
Referenced by create_from_spawngroup_and_go_path(), get_on_and_go_path(), simple_spawn_and_drive(), simple_spawn_single_and_drive(), and trigger_process().
function god_off | ( | ) |
Definition at line 1675 of file vehicle_shared.gsc.
Referenced by paths().
function god_on | ( | ) |
Definition at line 1670 of file vehicle_shared.gsc.
Referenced by paths().
function has_helicopter_dust_kickup | ( | ) |
Definition at line 1979 of file vehicle_shared.gsc.
References is_cheap(), and IS_PLANE.
Referenced by init().
function impact_fx | ( | fxname | , |
surfaceTypes | |||
) |
Definition at line 2765 of file vehicle_shared.gsc.
References PlayFx(), and trace().
Referenced by repulsor_fx(), and state_jump_update().
function init | ( | vehicle | ) |
Definition at line 1236 of file vehicle_shared.gsc.
References _disconnect_paths_when_stopped(), _vehicle_bad_place(), _vehicle_life(), aircraft_dust_kickup(), callback(), disconnect_paths(), enable_turrets(), friendly_fire_shield(), get(), get_on_path(), get_script_bundle(), has_helicopter_dust_kickup(), IS_ARTILLERY, is_cheap(), IS_PLANE, IS_TRUE, levelstuff(), main(), maingun_fx(), and toggle_lights_group().
Referenced by node_trigger_process(), set_variables(), setup_nodes(), and spline_debug().
function init_target_group | ( | ) |
Definition at line 3598 of file vehicle_shared.gsc.
Referenced by ActivateSentinel(), ai_tank_killstreak_start(), SpawnDart(), and SpawnHeliGunner().
function is_cheap | ( | ) |
Definition at line 1963 of file vehicle_shared.gsc.
Referenced by has_helicopter_dust_kickup(), and init().
function is_corpse | ( | veh | ) |
Description:
"Function Name: is_corpse( <veh> )"
"Summary: Checks to see if a vehicle is a corpse." "CallOn: AI"
"Mandatory Argument(s): <veh> The vehicle you're checking to see is a corpse."
"Example:if ( !is_corpse( veh_truck ) )"
"Single Player / Multi Player: singleplayer"
Definition at line 3401 of file vehicle_shared.gsc.
References IS_TRUE.
Referenced by death_cleanup_riders(), death_update_crash(), and main().
function is_node_script_origin | ( | pathnode | ) |
Definition at line 1733 of file vehicle_shared.gsc.
Referenced by trigger_process().
function is_node_script_struct | ( | node | ) |
Definition at line 1870 of file vehicle_shared.gsc.
References get().
Referenced by trigger_process().
function is_on | ( | vehicle | ) |
Description:
"Function Name: enter( <vehicle> )"
"Summary: This puts the guy into the vehicle and tells him to idle." "Module: AI" "CallOn: an actor"
"Mandatory Argument(s): <vehicle>: the vehicle to get in"
"Example:my_ai thread vehicle::enter(my_vehicle);"
"Single Player / Multi Player: singleplayer" !
Description:
/ function enter( vehicle, tag ) // self == ai { self vehicle_aianim::vehicle_enter( vehicle, tag ); }
/*!
Description:
"Function Name: is_on( <vehicle> )"
"Summary: Returns true if a player is on the vehicle." "Module: Vehicle" "CallOn: a player"
"Mandatory Argument(s): <vehicle>: the vehicle to check against"
"Example:if( player is_on( vehicle ) )"
"Single Player / Multi Player: singleplayer"
Definition at line 3444 of file vehicle_shared.gsc.
function is_unload_node | ( | ) |
Definition at line 2489 of file vehicle_shared.gsc.
Referenced by paths(), show_node_debug_info(), and unload_node().
function islastnode | ( | node | ) |
Definition at line 554 of file vehicle_shared.gsc.
References get_vehiclenode_any_dynamic().
Referenced by path_detour_get_detourpath().
function kill_vehicle | ( | attacker | ) |
Definition at line 3747 of file vehicle_shared.gsc.
function land | ( | ) |
Definition at line 2382 of file vehicle_shared.gsc.
References FLAT_ANGLES, GROUNDPOS, and set_goal_pos().
function levelstuff | ( | vehicle | ) |
function liftoff | ( | height | ) |
Definition at line 2405 of file vehicle_shared.gsc.
References set_goal_pos().
function lights_off | ( | ) |
Definition at line 2828 of file vehicle_shared.gsc.
References CF_TOGGLE_LIGHTS_OFF, and set().
Referenced by paths().
function lights_on | ( | team | ) |
Definition at line 2803 of file vehicle_shared.gsc.
References CF_TOGGLE_LIGHTS_FORCE_ALLIES, CF_TOGGLE_LIGHTS_FORCE_AXIS, CF_TOGGLE_LIGHTS_ON, and set().
Referenced by paths().
function maingun_fx | ( | ) |
Definition at line 2786 of file vehicle_shared.gsc.
Referenced by init().
function monitor_damage_as_occupant | ( | player | ) |
Definition at line 3722 of file vehicle_shared.gsc.
References update_damage_as_occupant().
Referenced by defaultstate_driving_enter(), EnterHelicopter(), HackedPostFunction(), and StartDartRemoteControl().
function monitor_missiles_locked_on_to_me | ( | player | , |
wait_time | = 0.1 |
||
) |
Definition at line 3617 of file vehicle_shared.gsc.
References get_closest_attacker_with_missile_locked_on_to_me().
Referenced by EnterHelicopter(), HackedPostFunction(), StartDartRemoteControl(), StartSentinelRemoteControl(), and startTankRemoteControl().
function node_trigger_process | ( | ) |
Definition at line 1739 of file vehicle_shared.gsc.
References add_proccess_trigger(), array_2d_add(), exists(), init(), script_flag_wait(), setup_dynamic_detour(), setup_groundnode_detour(), SPAWNFLAG, and SPAWNFLAG_VEHICLE_NODE_START_NODE.
Referenced by setup_triggers().
function path_detour | ( | node | ) |
Definition at line 367 of file vehicle_shared.gsc.
References crash_derailed_check(), crash_detour_check(), and path_detour_get_detourpath().
Referenced by trigger_process().
function path_detour_get_detourpath | ( | detournode | ) |
Definition at line 316 of file vehicle_shared.gsc.
References islastnode().
Referenced by crash_path_check(), path_detour(), and path_detour_script_origin().
function path_detour_script_origin | ( | detournode | ) |
Definition at line 333 of file vehicle_shared.gsc.
References path_detour_get_detourpath(), and paths().
Referenced by trigger_process().
function path_gate_open | ( | node | ) |
Definition at line 1092 of file vehicle_shared.gsc.
Referenced by trigger_process().
function path_gate_wait_till_open | ( | pathspot | ) |
Definition at line 1098 of file vehicle_shared.gsc.
References script_resume_speed(), and set_speed().
Referenced by paths().
function paths | ( | node | ) |
Definition at line 569 of file vehicle_shared.gsc.
References clear(), deathrolloff(), deathrollon(), delay(), enable_turrets(), exploder(), get(), god_off(), god_on(), IS_HELICOPTER, IS_TRUE, is_unload_node(), lights_off(), lights_on(), path_gate_wait_till_open(), pause_path(), resume_path(), script_wait(), set(), set_goal_pos(), unload_node(), unload_node_helicopter(), VEHICLE_DELETE, wait_till(), and waittill_any_ents().
Referenced by get_on_path(), path_detour_script_origin(), and resume_path_vehicle().
function pause_path | ( | ) |
Definition at line 870 of file vehicle_shared.gsc.
References IS_HELICOPTER, and IS_TRUE.
Referenced by paths(), and unload_node().
function play_looped_fx_on_tag | ( | effect | , |
durration | , | ||
tag | |||
) |
Definition at line 1994 of file vehicle_shared.gsc.
References _play_looped_fx_on_tag_origin_update(), and spawn().
function player_is_driver | ( | ) |
Definition at line 3753 of file vehicle_shared.gsc.
function print_debug_info | ( | str_info | ) |
Definition at line 3946 of file vehicle_shared.gsc.
References BLUE.
Referenced by show_node_debug_info().
function print_resume_speed | ( | timer | ) |
Definition at line 1646 of file vehicle_shared.gsc.
References timer().
function remove_from_target_group | ( | target_ent | ) |
Definition at line 3610 of file vehicle_shared.gsc.
Referenced by SupportTurretDestroyed().
function resume_path | ( | ) |
Definition at line 900 of file vehicle_shared.gsc.
References IS_HELICOPTER, and IS_TRUE.
Referenced by paths().
function resume_path_vehicle | ( | ) |
Definition at line 2368 of file vehicle_shared.gsc.
References get_vehiclenode_any_dynamic(), and paths().
function rider_walk_setup | ( | vehicle | ) |
Definition at line 500 of file vehicle_shared.gsc.
function script_resume_speed | ( | msg | , |
rate | |||
) |
Definition at line 1609 of file vehicle_shared.gsc.
References set_speed().
Referenced by path_gate_wait_till_open().
function set_alert_fx_level | ( | alert_level | ) |
Definition at line 2895 of file vehicle_shared.gsc.
References set().
function set_damage_fx_level | ( | damage_level | ) |
Definition at line 3012 of file vehicle_shared.gsc.
References set().
Referenced by HunterCallback_VehicleDamage(), quadtank_death(), shared_callback_damage(), siegebot_callback_damage(), state_death_update(), theia_callback_damage(), and update_damage_fx_level().
function set_goal_pos | ( | origin | , |
bStop | |||
) |
Definition at line 2392 of file vehicle_shared.gsc.
function set_speed | ( | speed | , |
rate | , | ||
msg | |||
) |
Definition at line 1577 of file vehicle_shared.gsc.
References debug_set_speed().
Referenced by death_update_crash(), path_gate_wait_till_open(), and script_resume_speed().
function set_variables | ( | vehicle | ) |
Definition at line 1157 of file vehicle_shared.gsc.
References exists(), and init().
Referenced by setup_spawners().
function set_vehicle_drivable_time | ( | duration_ms | , |
end_time_ms | |||
) |
Definition at line 3703 of file vehicle_shared.gsc.
Referenced by EnterHelicopter(), set_vehicle_drivable_time_starting_now(), StartSentinelRemoteControl(), startTankRemoteControl(), StartTurretRemoteControl(), and UpdateDrivableTimeForAllOccupants().
function set_vehicle_drivable_time_starting_now | ( | duration_ms | ) |
Definition at line 3694 of file vehicle_shared.gsc.
References set_vehicle_drivable_time().
function setup_dvars | ( | ) |
Definition at line 2025 of file vehicle_shared.gsc.
Referenced by __init__().
function setup_dynamic_detour | ( | pathnode | , |
get_func | |||
) |
Definition at line 1691 of file vehicle_shared.gsc.
Referenced by node_trigger_process().
function setup_groundnode_detour | ( | node | ) |
Definition at line 529 of file vehicle_shared.gsc.
References add_proccess_trigger().
Referenced by node_trigger_process().
function setup_level_vars | ( | ) |
function setup_nodes | ( | ) |
Definition at line 1855 of file vehicle_shared.gsc.
References exists(), and init().
Referenced by __init__().
function setup_script_gatetrigger | ( | trigger | ) |
Definition at line 172 of file vehicle_shared.gsc.
Referenced by trigger_process().
function setup_spawners | ( | a_veh_spawners | ) |
Definition at line 1880 of file vehicle_shared.gsc.
References _spawn_group(), ARRAY_ADD, and set_variables().
Referenced by __main__().
function setup_targetname_spawners | ( | ) |
Definition at line 2547 of file vehicle_shared.gsc.
Referenced by __init__().
function setup_triggers | ( | ) |
Definition at line 1834 of file vehicle_shared.gsc.
References get_all(), and node_trigger_process().
Referenced by __init__().
function should_update_damage_fx_level | ( | currentHealth | , |
damage | , | ||
maxHealth | |||
) |
Definition at line 2900 of file vehicle_shared.gsc.
References clamp(), damage(), get_script_bundle(), and VAL.
Referenced by HunterCallback_VehicleDamage(), shared_callback_damage(), siegebot_callback_damage(), theia_callback_damage(), and update_damage_fx_level().
function show_node_debug_info | ( | ) |
Definition at line 3926 of file vehicle_shared.gsc.
References IS_TRUE, is_unload_node(), and print_debug_info().
Referenced by _spline_debug().
function simple_spawn | ( | name | , |
b_supress_assert | = false |
||
) |
Definition at line 2591 of file vehicle_shared.gsc.
References _scripted_spawn(), array, and name.
Referenced by _spawn_array(), simple_spawn_and_drive(), simple_spawn_single(), and simple_spawn_single_and_drive().
function simple_spawn_and_drive | ( | name | ) |
Definition at line 2639 of file vehicle_shared.gsc.
References go_path(), name, and simple_spawn().
function simple_spawn_single | ( | name | , |
b_supress_assert | = false |
||
) |
Definition at line 2618 of file vehicle_shared.gsc.
References name, and simple_spawn().
function simple_spawn_single_and_drive | ( | name | ) |
Definition at line 2629 of file vehicle_shared.gsc.
References go_path(), name, and simple_spawn().
function sort_by_startingpos | ( | guysarray | ) |
Definition at line 480 of file vehicle_shared.gsc.
function spawn | ( | modelname | , |
targetname | , | ||
vehicletype | , | ||
origin | , | ||
angles | , | ||
destructibledef | |||
) |
Definition at line 2652 of file vehicle_shared.gsc.
Referenced by play_looped_fx_on_tag().
function spline_debug | ( | ) |
Definition at line 3898 of file vehicle_shared.gsc.
References _spline_debug(), init(), and set_val().
function stop_monitor_damage_as_occupant | ( | ) |
Definition at line 3717 of file vehicle_shared.gsc.
Referenced by defaultstate_driving_exit(), HackedPreFunction(), leave_dart(), and LeaveHelicopter().
function stop_monitor_missiles_locked_on_to_me | ( | ) |
Definition at line 3640 of file vehicle_shared.gsc.
Referenced by EndSentinelRemoteControl(), endTankRemoteControl(), HackedPreFunction(), leave_dart(), and LeaveHelicopter().
function toggle_ambient_anim_group | ( | groupID | , |
on | |||
) |
Definition at line 2844 of file vehicle_shared.gsc.
References set().
Referenced by Attack_Thread_rocket(), state_driving_update(), state_scripted_update(), TurnOffAllAmbientAnims(), and weapon_doors_state().
function toggle_burn_fx | ( | on | ) |
Definition at line 2868 of file vehicle_shared.gsc.
References set().
Referenced by burning_thread(), and TurnOffAllLightsAndLaser().
function toggle_emp_fx | ( | on | ) |
Definition at line 2863 of file vehicle_shared.gsc.
References set().
Referenced by defaultstate_emped_enter(), defaultstate_emped_update(), emped_enter(), state_emped_enter(), state_emped_update(), and TurnOffAllLightsAndLaser().
function toggle_exhaust_fx | ( | on | ) |
Description:
"Function Name: build_ai_anims( <aithread> , <vehiclethread> )"
"Summary: called in individual vehicle file - set threads for ai animation and vehicle animation assignments" "Module: Vehicle" "CallOn: A vehicle"
"Mandatory Argument(s): <aithread> : ai thread"
"Optional Argument(s): <vehiclethread> : vehicle thread"
"Example:vehicle build_ai_anims(&setanims,&set_vehicle_anims );"
"Single Player / Multi Player: singleplayer" !
Description:
/
function build_ai_anims( aithread, vehiclethread ) { level.vehicle_aianims[ self.vehicletype ] = [[ aithread ]](); if( isdefined( vehiclethread ) ) { level.vehicle_aianims[ self.vehicletype ] = [ vehiclethread ]; } }
/*!
Description:
"Function Name: build_attach_models( <modelsthread> )"
"Summary: called in individual vehicle file - thread for building attached models( ropes ) with animation" "Module: Vehicle" "CallOn: "
"Mandatory Argument(s): <modelsthread> : thread"
"Example:build_attach_models(&set_attached_models );"
"Single Player / Multi Player: singleplayer" !
Description:
/
function build_attach_models( modelsthread ) { level.vehicle_attachedmodels[ self.vehicletype ] = [[ modelsthread ]]();; }
/*!
Description:
"Function Name: build_unload_groups( <unloadgroupsthread> )"
"Summary: called in individual vehicle file - thread for building unload groups" "Module: Vehicle" "CallOn: A vehicle"
"Mandatory Argument(s): <modelsthread> : thread"
"Example:vehicle build_unload_groups(&Unload_Groups );"
"Single Player / Multi Player: singleplayer" !
Description:
/
function build_unload_groups( unloadgroupsthread ) { level.vehicle_unloadgroups[ self.vehicletype ] = [[ unloadgroupsthread ]](); }
function get_from_spawnstruct( target ) { return struct::get( target, "targetname" ); }
function get_from_entity( target ) { return getent( target, "targetname" ); }
function get_from_spawnstruct_target( target ) { return struct::get( target, "target" ); }
function get_from_entity_target( target ) { return getent( target, "target" ); }
function is_destructible() { return isdefined( self.destructible_type ); }
SCRIPTER_MOD: JesseS (5/12/200) - readded script_vehicleattackgroup scripting This allows vehicles to attack other vehicles automatically. Just set the script_vehicleattackgroup of the attacker to the script_vehiclespawngroup you want to attack. function attack_group_think() { self endon ("death"); self endon ("switch group"); self endon ("killed all targets");
if (isdefined (self.script_vehicleattackgroupwait)) { wait (self.script_vehicleattackgroupwait); }
for(;;) { get all the vehicles group = getentarray("script_vehicle", "classname");
get our target array valid_targets = []; for (i = 0; i< group.size; i++) { dpg: not all script vehicles have a script_vehiclespawngroup if( !isdefined( group[i].script_vehiclespawngroup ) ) { continue; } get all vehicles with the same spawngroup as the agroup we want to attack if (group[i].script_vehiclespawngroup == self.script_vehicleattackgroup) { Make sure we only attack different teams vehicles if (group[i].team != self.team) { ARRAY_ADD(valid_targets, group[i]); } } }
Try again every .5 seconds if there are no valid targets. if (valid_targets.size == 0) { wait (0.5); continue; }
Main loop which makes the vehicle fire on the nearest group it's been set to attack for (;;) { current_target = undefined; if (valid_targets.size != 0) { current_target = self get_nearest_target(valid_targets); } else { We killed them all, end this thread self notify ("killed all targets"); }
if it's a death vehicle, remove it from the list of valid targets if (current_target.health <= 0) { ArrayRemoveValue(valid_targets, current_target); continue; } else { set the target ent for the vehicle. offset a bit so it doesnt shoot into the ground self setturrettargetent( current_target, (0,0,50) );
DPG 10/22/07 - in case we want specific wait values on the vehicle if( isdefined( self.fire_delay_min ) && isdefined( self.fire_delay_max ) ) { in case max is less than min if( self.fire_delay_max < self.fire_delay_min ) { self.fire_delay_max = self.fire_delay_min; }
wait ( randomintrange(self.fire_delay_min, self.fire_delay_max) ); }
else { wait (randomintrange(4, 6)); } self fireweapon(); } } }
if this is called again, just add new group to queue queue should be sorted by distance delete from queue once vehicle is dead, check to see if vehicles health > 0 }
Gets the nearest ent to self function get_nearest_target(valid_targets) { nearest_distsq = 99999999; nearest = undefined;
for (i = 0; i < valid_targets.size; i++) { if( !isdefined( valid_targets[i] ) ) { continue; } current_distsq = distancesquared( self.origin, valid_targets[i].origin ); if (current_distsq < nearest_distsq) { nearest_distsq = current_distsq; nearest = valid_targets[i]; } } return nearest; }
------------—// Debug section // ------------—// /# function debug_vehicle() { self endon( "death" );
if( GetDvarString( "debug_vehicle_health" ) == "" ) { SetDvar( "debug_vehicle_health", "0" ); }
while( 1 ) { if( GetDvarInt( "debug_vehicle_health" ) > 0 ) { print3d( self.origin, "Health: " + self.health, ( 1, 1, 1 ), 1, 3 ); }
WAIT_SERVER_FRAME; } }
function get_dummy() { if ( IS_TRUE( self.modeldummyon ) ) { eModel = self.modeldummy; } else { eModel = self; } return eModel; }
function add_main_callback( vehicleType, main ) { if ( !isdefined( level.vehicle_main_callback ) ) { level.vehicle_main_callback = []; }
/# if ( isdefined( level.vehicle_main_callback[ vehicleType ] ) ) { PrintLn( "WARNING! Main callback function for vehicle " + vehicleType + " already exists. Proceeding with override" ); }
level.vehicle_main_callback[ vehicleType ] = main;
}
function vehicle_get_occupant_team() { occupants = self GetVehOccupants();
if ( occupants.size != 0 ) { first occupant defines the vehicle team occupant = occupants[0];
if ( isplayer(occupant) ) { return occupant.team; } }
return self.team; }
/*!
Description:
"Function Name: toggle_exhaust_fx( <on> )" "Module: Vehicle" "CallOn: a vehicle"
"Summary: Will toggle the vehicles exhaust fx on (1) and off (0)"
"Mandatory Argument(s): <on> : 1 - exhaustfx on, 0 - exhaustfx off"
"Example:level.tank vehicle::toggle_exhaust_fx(0);"
"Single Player / Multi Player: singleplayer"
Definition at line 3335 of file vehicle_shared.gsc.
References set().
Referenced by crash_stop(), croc_death(), croc_off(), croc_on(), defaultstate_death_enter(), defaultstate_emped_enter(), defaultstate_emped_exit(), defaultstate_off_enter(), defaultstate_off_exit(), Explode(), flipping_shooting_death(), metalstorm_death(), metalstorm_off(), metalstorm_on(), quadrotor_death(), show_weak_spots(), state_off_enter(), state_off_exit(), turret_gadget_deploy_off(), and turret_gadget_deploy_on().
function toggle_lights_group | ( | groupID | , |
on | |||
) |
Definition at line 2833 of file vehicle_shared.gsc.
References set().
Referenced by init(), init_clientfields(), theia_callback_damage(), and TurnOffAllLightsAndLaser().
function toggle_sounds | ( | on | ) |
Description:
"Function Name: toggle_sounds( <on> )" "Module: Vehicle" "CallOn: Vehicle"
"Summary: Will toggle the vehicle's sounds between on (1) and off (0)"
"Mandatory Argument(s): <on> : 1 - sounds on, 0 - sounds off"
"Example:car toggle_sounds(0);"
"Single Player / Multi Player: singleplayer"
Definition at line 3379 of file vehicle_shared.gsc.
References set().
Referenced by crash_stop(), croc_death(), croc_off(), croc_on(), defaultstate_death_enter(), defaultstate_emped_enter(), defaultstate_emped_exit(), defaultstate_off_enter(), defaultstate_off_exit(), escort_drone_off(), escort_drone_on(), Explode(), flipping_shooting_death(), InitEnemySelection(), metalstorm_death(), metalstorm_off(), metalstorm_on(), quadrotor_crash_movement(), quadrotor_death(), quadrotor_off(), quadrotor_on(), set_movement_and_accel(), SpawnRaps(), state_off_enter(), state_off_exit(), turret_gadget_deploy_off(), and turret_gadget_deploy_on().
function toggle_tread_fx | ( | on | ) |
Description:
"Function Name: toggle_tread_fx( <on> )" "Module: Vehicle" "CallOn: a vehicle"
"Summary: Will toggle the vehicles tread fx on (1) and off (0)"
"Mandatory Argument(s): <on> : 1 - treadfx on, 0 - treadfx off"
"Example:level.tank toggle_tread_fx(1);"
"Single Player / Multi Player: singleplayer"
Definition at line 3357 of file vehicle_shared.gsc.
References set().
Referenced by crash_stop(), croc_death(), croc_off(), croc_on(), defaultstate_death_enter(), defaultstate_emped_enter(), defaultstate_emped_exit(), defaultstate_off_enter(), defaultstate_off_exit(), escort_drone_off(), escort_drone_on(), Explode(), flipping_shooting_death(), metalstorm_death(), metalstorm_off(), metalstorm_on(), quadrotor_death(), quadrotor_off(), quadrotor_on(), state_off_enter(), and state_off_exit().
function trigger_process | ( | trigger | ) |
Definition at line 182 of file vehicle_shared.gsc.
References clear(), go_path(), is_node_script_origin(), is_node_script_struct(), path_detour(), path_detour_script_origin(), path_gate_open(), script_delay(), set(), setup_script_gatetrigger(), and wait_till().
Referenced by __init__().
function unload_node | ( | node | ) |
Definition at line 2441 of file vehicle_shared.gsc.
References IS_HELICOPTER, IS_PLANE, is_unload_node(), pause_path(), unload(), and wait_till_stable().
Referenced by paths().
function unload_node_helicopter | ( | node | ) |
Definition at line 2494 of file vehicle_shared.gsc.
References end(), and trace().
Referenced by paths().
function update_damage_as_occupant | ( | damage_taken | , |
max_health | |||
) |
Definition at line 3709 of file vehicle_shared.gsc.
References clamp().
Referenced by MechtankCallback_VehicleDamage(), monitor_damage_as_occupant(), monitor_enter_vehicle(), OnTurretDamage(), QuadtankCallback_VehicleDamage(), siegebot_callback_damage(), startTankRemoteControl(), StartTurretRemoteControl(), tank_damage_think(), and vehicle_occupied().
function update_damage_fx_level | ( | currentHealth | , |
damage | , | ||
maxHealth | |||
) |
Definition at line 2999 of file vehicle_shared.gsc.
References damage(), set_damage_fx_level(), and should_update_damage_fx_level().
Referenced by QuadtankCallback_VehicleDamage().
function vehicle_spawner_tool | ( | ) |
Definition at line 3776 of file vehicle_shared.gsc.
References destroy(), Spawn(), and WAIT_SERVER_FRAME.
function wait_till_stable | ( | ) |
Definition at line 2417 of file vehicle_shared.gsc.
References timer().
Referenced by unload_node().