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

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 ()
 

Macro Definition Documentation

◆ ANIMTREE

#define ANIMTREE   "generic"

Definition at line 24 of file vehicle_shared.gsc.

◆ MAX_AMBIENT_ANIM_GROUPS

#define MAX_AMBIENT_ANIM_GROUPS   3

Definition at line 22 of file vehicle_shared.gsc.

◆ MAX_LIGHTFX_GROUPS

#define MAX_LIGHTFX_GROUPS   3

Definition at line 21 of file vehicle_shared.gsc.

Function Documentation

◆ __init__()

◆ __main__()

function __main__ ( )

Definition at line 165 of file vehicle_shared.gsc.

References setup_spawners().

◆ _disconnect_paths_when_stopped()

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().

◆ _play_looped_fx_on_tag_origin_update()

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().

◆ _remove_non_riders_from_array()

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().

◆ _scripted_spawn()

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().

◆ _scripted_spawn_go()

function _scripted_spawn_go ( group  )

Definition at line 1151 of file vehicle_shared.gsc.

Referenced by _scripted_spawn().

◆ _spawn_array()

function _spawn_array ( spawners  )

Definition at line 439 of file vehicle_shared.gsc.

References _remove_non_riders_from_array(), and simple_spawn().

◆ _spawn_group()

function _spawn_group ( spawngroup  )

Definition at line 1112 of file vehicle_shared.gsc.

References _vehicle_spawn().

Referenced by setup_spawners().

◆ _spline_debug()

function _spline_debug ( )

Definition at line 3911 of file vehicle_shared.gsc.

References show_node_debug_info(), and wait_till().

Referenced by spline_debug().

◆ _vehicle_bad_place()

function _vehicle_bad_place ( )

Definition at line 2249 of file vehicle_shared.gsc.

Referenced by init().

◆ _vehicle_life()

function _vehicle_life ( )

Definition at line 1921 of file vehicle_shared.gsc.

Referenced by init().

◆ _vehicle_load_assets()

function _vehicle_load_assets ( )

Definition at line 1957 of file vehicle_shared.gsc.

◆ _vehicle_spawn()

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().

◆ _watch_for_hijacked_vehicles()

function private _watch_for_hijacked_vehicles ( )

Definition at line 3549 of file vehicle_shared.gsc.

References single_thread().

Referenced by __init__().

◆ add_hijack_function()

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.

References ARRAY_ADD, and DEFAULT.

◆ add_proccess_trigger()

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().

◆ add_spawn_function()

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.

References ARRAY_ADD, and DEFAULT.

◆ add_spawn_function_by_type()

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.

References ARRAY_ADD, and DEFAULT.

◆ add_to_target_group()

function add_to_target_group ( target_ent  )

◆ ai_should_be_added()

function ai_should_be_added ( ai  )

Definition at line 460 of file vehicle_shared.gsc.

Referenced by _remove_non_riders_from_array().

◆ aircraft_dust_kickup()

function aircraft_dust_kickup ( model  )

Definition at line 2662 of file vehicle_shared.gsc.

References trace().

Referenced by init().

◆ array_2d_add()

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().

◆ attacker_is_on_my_team()

function attacker_is_on_my_team ( attacker  )

Definition at line 2142 of file vehicle_shared.gsc.

Referenced by friendly_fire_shield_callback().

◆ attacker_troop_is_on_my_team()

function attacker_troop_is_on_my_team ( attacker  )

Definition at line 2154 of file vehicle_shared.gsc.

Referenced by friendly_fire_shield_callback().

◆ build_drive()

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().

◆ bullet_shielded()

function bullet_shielded ( type  )

Definition at line 2170 of file vehicle_shared.gsc.

Referenced by friendly_fire_shield_callback().

◆ connect_paths()

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().

◆ crash_derailed_check()

function crash_derailed_check ( detourpath  )

Definition at line 362 of file vehicle_shared.gsc.

Referenced by path_detour().

◆ crash_detour_check()

function crash_detour_check ( detourpath  )

Definition at line 342 of file vehicle_shared.gsc.

Referenced by path_detour().

◆ create_from_spawngroup_and_go_path()

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().

◆ debug_set_speed()

function debug_set_speed ( speed  ,
rate  ,
msg   
)

Definition at line 1590 of file vehicle_shared.gsc.

Referenced by set_speed().

◆ detach_getoutrigs()

function detach_getoutrigs ( )

Definition at line 1420 of file vehicle_shared.gsc.

◆ detach_path()

function detach_path ( )

Definition at line 2538 of file vehicle_shared.gsc.

References FLAT_ANGLES.

◆ disconnect_paths()

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().

◆ do_death_dynents()

function do_death_dynents ( special_status  = 1)

◆ do_death_fx()

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().

◆ do_gib_dynents()

function do_gib_dynents ( )

Definition at line 2880 of file vehicle_shared.gsc.

References set().

Referenced by gib().

◆ enable_auto_disconnect_path()

function enable_auto_disconnect_path ( )

Definition at line 1492 of file vehicle_shared.gsc.

References _disconnect_paths_when_stopped().

◆ enable_turrets()

function enable_turrets ( veh  )

Definition at line 1433 of file vehicle_shared.gsc.

References disable(), enable(), and IS_TRUE.

Referenced by init(), and paths().

◆ friendly_fire_shield()

◆ friendly_fire_shield_callback()

function friendly_fire_shield_callback ( attacker  ,
amount  ,
type   
)

◆ get_closest_attacker_with_missile_locked_on_to_me()

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().

◆ get_normal_anim_time()

function get_normal_anim_time ( animation  )

Definition at line 1680 of file vehicle_shared.gsc.

◆ get_off_path()

function get_off_path ( )

Definition at line 986 of file vehicle_shared.gsc.

◆ get_on_and_go_path()

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().

◆ get_on_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().

◆ get_vehiclenode_any_dynamic()

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().

◆ go_path()

◆ god_off()

function god_off ( )

Definition at line 1675 of file vehicle_shared.gsc.

Referenced by paths().

◆ god_on()

function god_on ( )

Definition at line 1670 of file vehicle_shared.gsc.

Referenced by paths().

◆ has_helicopter_dust_kickup()

function has_helicopter_dust_kickup ( )

Definition at line 1979 of file vehicle_shared.gsc.

References is_cheap(), and IS_PLANE.

Referenced by init().

◆ impact_fx()

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().

◆ init()

◆ init_target_group()

function init_target_group ( )

◆ is_cheap()

function is_cheap ( )

Definition at line 1963 of file vehicle_shared.gsc.

Referenced by has_helicopter_dust_kickup(), and init().

◆ is_corpse()

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().

◆ is_node_script_origin()

function is_node_script_origin ( pathnode  )

Definition at line 1733 of file vehicle_shared.gsc.

Referenced by trigger_process().

◆ is_node_script_struct()

function is_node_script_struct ( node  )

Definition at line 1870 of file vehicle_shared.gsc.

References get().

Referenced by trigger_process().

◆ is_on()

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.

◆ is_unload_node()

function is_unload_node ( )

Definition at line 2489 of file vehicle_shared.gsc.

Referenced by paths(), show_node_debug_info(), and unload_node().

◆ islastnode()

function islastnode ( node  )

Definition at line 554 of file vehicle_shared.gsc.

References get_vehiclenode_any_dynamic().

Referenced by path_detour_get_detourpath().

◆ kill_vehicle()

function kill_vehicle ( attacker  )

Definition at line 3747 of file vehicle_shared.gsc.

◆ land()

function land ( )

Definition at line 2382 of file vehicle_shared.gsc.

References FLAT_ANGLES, GROUNDPOS, and set_goal_pos().

◆ levelstuff()

function levelstuff ( vehicle  )

Definition at line 415 of file vehicle_shared.gsc.

References array_2d_add().

Referenced by init().

◆ liftoff()

function liftoff ( height  )

Definition at line 2405 of file vehicle_shared.gsc.

References set_goal_pos().

◆ lights_off()

function lights_off ( )

Definition at line 2828 of file vehicle_shared.gsc.

References CF_TOGGLE_LIGHTS_OFF, and set().

Referenced by paths().

◆ lights_on()

function lights_on ( team  )

◆ maingun_fx()

function maingun_fx ( )

Definition at line 2786 of file vehicle_shared.gsc.

Referenced by init().

◆ monitor_damage_as_occupant()

function monitor_damage_as_occupant ( player  )

◆ monitor_missiles_locked_on_to_me()

function monitor_missiles_locked_on_to_me ( player  ,
wait_time  = 0.1 
)

◆ node_trigger_process()

◆ path_detour()

function path_detour ( node  )

◆ path_detour_get_detourpath()

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().

◆ 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().

◆ path_gate_open()

function path_gate_open ( node  )

Definition at line 1092 of file vehicle_shared.gsc.

Referenced by trigger_process().

◆ path_gate_wait_till_open()

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().

◆ paths()

◆ pause_path()

function pause_path ( )

Definition at line 870 of file vehicle_shared.gsc.

References IS_HELICOPTER, and IS_TRUE.

Referenced by paths(), and unload_node().

◆ play_looped_fx_on_tag()

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().

◆ player_is_driver()

function player_is_driver ( )

Definition at line 3753 of file vehicle_shared.gsc.

◆ print_debug_info()

function print_debug_info ( str_info  )

Definition at line 3946 of file vehicle_shared.gsc.

References BLUE.

Referenced by show_node_debug_info().

◆ print_resume_speed()

function print_resume_speed ( timer  )

Definition at line 1646 of file vehicle_shared.gsc.

References timer().

◆ remove_from_target_group()

function remove_from_target_group ( target_ent  )

Definition at line 3610 of file vehicle_shared.gsc.

Referenced by SupportTurretDestroyed().

◆ resume_path()

function resume_path ( )

Definition at line 900 of file vehicle_shared.gsc.

References IS_HELICOPTER, and IS_TRUE.

Referenced by paths().

◆ resume_path_vehicle()

function resume_path_vehicle ( )

Definition at line 2368 of file vehicle_shared.gsc.

References get_vehiclenode_any_dynamic(), and paths().

◆ rider_walk_setup()

function rider_walk_setup ( vehicle  )

Definition at line 500 of file vehicle_shared.gsc.

◆ script_resume_speed()

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().

◆ set_alert_fx_level()

function set_alert_fx_level ( alert_level  )

Definition at line 2895 of file vehicle_shared.gsc.

References set().

◆ set_damage_fx_level()

◆ set_goal_pos()

function set_goal_pos ( origin  ,
bStop   
)

Definition at line 2392 of file vehicle_shared.gsc.

Referenced by land(), liftoff(), and paths().

◆ set_speed()

function set_speed ( speed  ,
rate  ,
msg   
)

◆ set_variables()

function set_variables ( vehicle  )

Definition at line 1157 of file vehicle_shared.gsc.

References exists(), and init().

Referenced by setup_spawners().

◆ set_vehicle_drivable_time()

function set_vehicle_drivable_time ( duration_ms  ,
end_time_ms   
)

◆ set_vehicle_drivable_time_starting_now()

function set_vehicle_drivable_time_starting_now ( duration_ms  )

Definition at line 3694 of file vehicle_shared.gsc.

References set_vehicle_drivable_time().

◆ setup_dvars()

function setup_dvars ( )

Definition at line 2025 of file vehicle_shared.gsc.

Referenced by __init__().

◆ setup_dynamic_detour()

function setup_dynamic_detour ( pathnode  ,
get_func   
)

Definition at line 1691 of file vehicle_shared.gsc.

Referenced by node_trigger_process().

◆ setup_groundnode_detour()

function setup_groundnode_detour ( node  )

Definition at line 529 of file vehicle_shared.gsc.

References add_proccess_trigger().

Referenced by node_trigger_process().

◆ setup_level_vars()

function setup_level_vars ( )

Definition at line 2039 of file vehicle_shared.gsc.

References Spawn().

Referenced by __init__().

◆ setup_nodes()

function setup_nodes ( )

Definition at line 1855 of file vehicle_shared.gsc.

References exists(), and init().

Referenced by __init__().

◆ setup_script_gatetrigger()

function setup_script_gatetrigger ( trigger  )

Definition at line 172 of file vehicle_shared.gsc.

Referenced by trigger_process().

◆ setup_spawners()

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__().

◆ setup_targetname_spawners()

function setup_targetname_spawners ( )

Definition at line 2547 of file vehicle_shared.gsc.

Referenced by __init__().

◆ setup_triggers()

function setup_triggers ( )

Definition at line 1834 of file vehicle_shared.gsc.

References get_all(), and node_trigger_process().

Referenced by __init__().

◆ should_update_damage_fx_level()

function should_update_damage_fx_level ( currentHealth  ,
damage  ,
maxHealth   
)

◆ show_node_debug_info()

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().

◆ simple_spawn()

function simple_spawn ( name  ,
b_supress_assert  = false 
)

◆ simple_spawn_and_drive()

function simple_spawn_and_drive ( name  )

Definition at line 2639 of file vehicle_shared.gsc.

References go_path(), name, and simple_spawn().

◆ simple_spawn_single()

function simple_spawn_single ( name  ,
b_supress_assert  = false 
)

Definition at line 2618 of file vehicle_shared.gsc.

References name, and simple_spawn().

◆ simple_spawn_single_and_drive()

function simple_spawn_single_and_drive ( name  )

Definition at line 2629 of file vehicle_shared.gsc.

References go_path(), name, and simple_spawn().

◆ sort_by_startingpos()

function sort_by_startingpos ( guysarray  )

Definition at line 480 of file vehicle_shared.gsc.

◆ spawn()

function spawn ( modelname  ,
targetname  ,
vehicletype  ,
origin  ,
angles  ,
destructibledef   
)

Definition at line 2652 of file vehicle_shared.gsc.

Referenced by play_looped_fx_on_tag().

◆ spline_debug()

function spline_debug ( )

Definition at line 3898 of file vehicle_shared.gsc.

References _spline_debug(), init(), and set_val().

◆ stop_monitor_damage_as_occupant()

function stop_monitor_damage_as_occupant ( )

◆ stop_monitor_missiles_locked_on_to_me()

function stop_monitor_missiles_locked_on_to_me ( )

◆ toggle_ambient_anim_group()

function toggle_ambient_anim_group ( groupID  ,
on   
)

◆ toggle_burn_fx()

function toggle_burn_fx ( on  )

Definition at line 2868 of file vehicle_shared.gsc.

References set().

Referenced by burning_thread(), and TurnOffAllLightsAndLaser().

◆ toggle_emp_fx()

function toggle_emp_fx ( on  )

◆ toggle_exhaust_fx()

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().

◆ toggle_lights_group()

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().

◆ toggle_sounds()

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().

◆ toggle_tread_fx()

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().

◆ trigger_process()

◆ unload_node()

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().

◆ unload_node_helicopter()

function unload_node_helicopter ( node  )

Definition at line 2494 of file vehicle_shared.gsc.

References end(), and trace().

Referenced by paths().

◆ update_damage_as_occupant()

◆ update_damage_fx_level()

function update_damage_fx_level ( currentHealth  ,
damage  ,
maxHealth   
)

◆ vehicle_spawner_tool()

function vehicle_spawner_tool ( )

Definition at line 3776 of file vehicle_shared.gsc.

References destroy(), Spawn(), and WAIT_SERVER_FRAME.

◆ wait_till_stable()

function wait_till_stable ( )

Definition at line 2417 of file vehicle_shared.gsc.

References timer().

Referenced by unload_node().