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

Go to the source code of this file.

Data Structures

class  cAwarenessSceneObject
 
class  cSceneObject
 

Macros

#define DAMAGE_STR(dmg)   ( !isdefined( dmg ) || dmg == "none" ? "" : dmg )
 
#define DEFAULT_ACTOR_WEAPON   GetWeapon( "ar_standard" )
 
#define NEW_STATE(__state)
 
#define TEST_SCENES   array()
 
#define WEAP_FIRST_RAISE   31
 
#define WEAP_RAISE   30
 

Functions

function __init__ ()
 
function __main__ ()
 
function _call_state_funcs (str_state)
 
function private _fire_ordered_notitifes (group_obj, group_name)
 
function _get_type_count (str_type, str_scenedef)
 
function _has_init_state ()
 
function _init_instance (str_scenedef, a_ents, b_test_run=false)
 
function _is_ent_actor (ent)
 
function _is_ent_player (ent)
 
function _is_ent_vehicle (ent)
 
function private _load_female_scene (s_bundle, a_ents)
 
function _on_alert_run_scene_thread ()
 
function _play_camera_anim_on_player (player, v_origin, v_angles, ignore_initial_notetracks)
 
function _play_camera_anim_on_player_callback (player)
 
function _play_camera_anims ()
 
function _play_extracam_on_player (player, n_index, str_camera_anim, v_origin, v_angles)
 
function _play_instance (s_tracker, str_scenedef, a_ents, b_test_run=false, str_state, str_mode)
 
function _prepare ()
 
function _release_object ()
 
function private _scene_link ()
 
function private _skip_scene ()
 
function _skip_scene (skipped_scene_name, b_sequence, b_player_scene, b_check_linked_scene)
 
function _stop_camera_anim_on_player (player)
 
function _stop_camera_anims ()
 
function _stop_instance (b_clear=false, str_scenedef)
 
function _trigger_init (trig)
 
function _trigger_play (trig)
 
function _trigger_stop (trig)
 
function _wait_for_camera_animation (str_cam, n_start_time)
 
function private _wait_for_ordered_notify (id, group_obj, group_name, str_note)
 
function _wait_server_time (n_time, n_start_time=0)
 
function add_player_linked_scene (linked_scene_str)
 
function add_scene_func (str_scenedef, func, str_state="play",...)
 
function add_scene_ordered_notetrack (group_name, str_note)
 
function add_to_sync_list ()
 
function add_wait_for_streamer_hint_scene (str_scene_name)
 
function allows_multiple ()
 
function any_button_pressed ()
 
function assign_ents (a_ents)
 
function clear_scene_skipping_ui ()
 
 constructor ()
 
function delete_scene_data (str_scenename)
 
function destroy_dev_info ()
 
 destructor ()
 
function display_dev_info ()
 
function private finish_skip_scene ()
 
function get_active_scene (str_scenedef)
 
function get_active_scenes (str_scenedef)
 
function get_actor_count (str_scenedef)
 
function get_align_ent ()
 
function get_anim_relative_start_time (animation, n_time)
 
function get_ents ()
 
function get_existing_ent (str_name, b_spawner_only=false, b_nodes_and_structs=false)
 
function get_object_id ()
 
function get_objects (str_type)
 
function get_player_count (str_scenedef)
 
function get_prop_count (str_scenedef)
 
function get_root ()
 
function get_scenedef (str_scenedef)
 
function get_scenedefs (str_type="scene")
 
function get_state ()
 
function get_valid_object_defs ()
 
function get_valid_objects ()
 
function get_vehicle_count (str_scenedef)
 
function has_init_state ()
 
function has_init_state (str_scenedef)
 
function has_next_scene ()
 
function has_player ()
 
function init (arg1, arg2, arg3, b_test_run)
 
function init (str_scenedef, s_scenedef, e_align, a_ents, b_test_run)
 
function private init_scene_sequence_started (b_started)
 
function initialize (a_ents, b_playing=false)
 
function is_active (str_scenedef)
 
function is_capture_mode ()
 
function is_igc ()
 
function is_igc_active ()
 
function is_looping ()
 
function is_player_anim_ending_early ()
 
function is_playing (str_scenedef)
 
function is_ready (str_scenedef)
 
function is_scene_shared ()
 
function private is_scene_shared_sequence ()
 
function is_skipping_in_progress ()
 
function is_skipping_player_scene ()
 
function is_skipping_scene ()
 
function is_valid_ent (ent)
 
function loop_camera_anim_to_set_up_for_capture ()
 
function new_object ()
 
function on_error ()
 
function on_load_wait ()
 
function on_player_connect ()
 
function on_player_disconnect ()
 
function play (arg1, arg2, arg3, b_test_run=false, str_state, str_mode="")
 
function play (str_alert_state)
 
function play (str_awareness_state="low_alert")
 
function play (str_state="play", a_ents, b_testing=false, str_mode="")
 
function private prepare_generic_model_anim (ent)
 
function private prepare_player_model_anim (ent)
 
function remove_from_sync_list ()
 
function remove_invalid_scene_objects (s_scenedef)
 
function remove_player_linked_scene (linked_scene_str)
 
function remove_scene_func (str_scenedef, func, str_state="play")
 
function run_instances ()
 
function run_next ()
 
function scene_disable_player_stuff (b_hide_hud=true)
 
function scene_enable_player_stuff (b_hide_hud=true)
 
function set_igc_active (b_in_igc)
 
function should_skip_linked_to_players_scene ()
 
function should_skip_scene_loop ()
 
function should_spectate_on_join ()
 
function skip_scene (b_sequence)
 
function skip_scene (scene_name, b_sequence, b_player_scene, b_check_linked_scene)
 
function skipto_end (arg1, arg2, arg3, n_time, b_include_players=false)
 
function skipto_end_noai (arg1, arg2, arg3, n_time)
 
function spawn (arg1, arg2, arg3, arg4, b_test_run)
 
function stop (arg1, arg2, arg3)
 
function stop (b_clear=false, b_finished=false)
 
function streamer_request_completed ()
 
function sync_with_client_scene (str_state, b_test_run=false)
 
function sync_with_other_scenes ()
 
function synced_delete ()
 
function private trigger_scene_sequence_started (scene_object, entity)
 
function private update_scene_sequence ()
 
function updateIGCViewtime (b_in_igc)
 
function wait_till_scene_ready (o_exclude, b_ignore_streamer=false)
 
function wait_until_spectate_on_join_completes ()
 
function waittill_skip_sequence_completed ()
 
function watch_scene_ending ()
 
function watch_scene_skip_requests ()
 
function watch_scene_skipping ()
 

Variables

cSceneObject _e_root
 
var _n_object_id
 
var _n_request_time
 
var _n_streamer_req
 
var _str_mode
 
var _str_notify_name
 
var _str_state
 
function _assign_ents_by_name a_objects
 
function wait_till_objects_ready array
 

Macro Definition Documentation

◆ DAMAGE_STR

#define DAMAGE_STR (   dmg)    ( !isdefined( dmg ) || dmg == "none" ? "" : dmg )

Definition at line 66 of file scene_shared.gsc.

◆ DEFAULT_ACTOR_WEAPON

#define DEFAULT_ACTOR_WEAPON   GetWeapon( "ar_standard" )

Definition at line 72 of file scene_shared.gsc.

◆ NEW_STATE

#define NEW_STATE (   __state)
Value:
‪flagsys::clear( "ready" );\
‪ flagsys::clear( "main_done" );\
_str_state = __state;\
self notify( "new_state" );\
self endon( "new_state" );\
self notify(__state);\
log( __state );\
waittillframeend;

Definition at line 56 of file scene_shared.gsc.

◆ TEST_SCENES

#define TEST_SCENES   array()

Definition at line 54 of file scene_shared.gsc.

◆ WEAP_FIRST_RAISE

#define WEAP_FIRST_RAISE   31

Definition at line 70 of file scene_shared.gsc.

◆ WEAP_RAISE

#define WEAP_RAISE   30

Definition at line 69 of file scene_shared.gsc.

Function Documentation

◆ __init__()

◆ __main__()

function __main__ ( )

◆ _call_state_funcs()

function _call_state_funcs ( str_state  )

Definition at line 2931 of file scene_shared.gsc.

References _e_root, _str_notify_name, a_ents, get_ents(), and wait_till_scene_ready().

Referenced by initialize(), play(), skip_scene(), and stop().

◆ _fire_ordered_notitifes()

function private _fire_ordered_notitifes ( group_obj  ,
group_name   
)

Definition at line 5644 of file scene_shared.gsc.

Referenced by _wait_for_ordered_notify().

◆ _get_type_count()

function _get_type_count ( str_type  ,
str_scenedef   
)

Definition at line 4814 of file scene_shared.gsc.

References get_scenedef().

Referenced by get_actor_count(), get_player_count(), get_prop_count(), and get_vehicle_count().

◆ _has_init_state()

function _has_init_state ( )

Definition at line 4725 of file scene_shared.gsc.

References IS_TRUE.

Referenced by cSceneObject::has_init_state(), and has_init_state().

◆ _init_instance()

function _init_instance ( str_scenedef  ,
a_ents  ,
b_test_run  = false 
)

◆ _is_ent_actor()

function _is_ent_actor ( ent  )

Definition at line 2169 of file scene_shared.gsc.

Referenced by assign_ents().

◆ _is_ent_player()

function _is_ent_player ( ent  )

Definition at line 2164 of file scene_shared.gsc.

Referenced by assign_ents().

◆ _is_ent_vehicle()

function _is_ent_vehicle ( ent  )

Definition at line 2174 of file scene_shared.gsc.

Referenced by assign_ents().

◆ _load_female_scene()

function private _load_female_scene ( s_bundle  ,
a_ents   
)

Definition at line 4312 of file scene_shared.gsc.

References a_ents, get_script_bundle(), IS_EQUAL, and is_female().

Referenced by _init_instance().

◆ _on_alert_run_scene_thread()

function new_object::_on_alert_run_scene_thread ( )

Definition at line 3508 of file scene_shared.gsc.

◆ _play_camera_anim_on_player()

function _play_camera_anim_on_player ( player  ,
v_origin  ,
v_angles  ,
ignore_initial_notetracks   
)

Definition at line 2589 of file scene_shared.gsc.

References _s, and scene_disable_player_stuff().

Referenced by _play_camera_anim_on_player_callback(), and _play_camera_anims().

◆ _play_camera_anim_on_player_callback()

function _play_camera_anim_on_player_callback ( player  )

Definition at line 2584 of file scene_shared.gsc.

References _play_camera_anim_on_player().

Referenced by _play_camera_anims(), and _stop_camera_anim_on_player().

◆ _play_camera_anims()

◆ _play_extracam_on_player()

function _play_extracam_on_player ( player  ,
n_index  ,
str_camera_anim  ,
v_origin  ,
v_angles   
)

Definition at line 2626 of file scene_shared.gsc.

Referenced by _play_camera_anims().

◆ _play_instance()

function _play_instance ( s_tracker  ,
str_scenedef  ,
a_ents  ,
b_test_run  = false,
str_state  ,
str_mode   
)

◆ _prepare()

◆ _release_object()

function _release_object ( )

Definition at line 2905 of file scene_shared.gsc.

References _a_objects, and WAIT_SERVER_FRAME.

Referenced by stop().

◆ _scene_link()

function private _scene_link ( )

Definition at line 3957 of file scene_shared.gsc.

References spawn_model(), and waittill_any_ents_two().

Referenced by __main__().

◆ _skip_scene() [1/2]

function private _skip_scene ( )

Definition at line 3307 of file scene_shared.gsc.

References _a_objects.

Referenced by skip_scene().

◆ _skip_scene() [2/2]

function _skip_scene ( skipped_scene_name  ,
b_sequence  ,
b_player_scene  ,
b_check_linked_scene   
)

Definition at line 5188 of file scene_shared.gsc.

References is_scene_shared(), and IS_TRUE.

◆ _stop_camera_anim_on_player()

function _stop_camera_anim_on_player ( player  )

◆ _stop_camera_anims()

function _stop_camera_anims ( )

Definition at line 2632 of file scene_shared.gsc.

References _stop_camera_anim_on_player(), and IS_TRUE.

Referenced by play(), and stop().

◆ _stop_instance()

function _stop_instance ( b_clear  = false,
str_scenedef   
)

Definition at line 4695 of file scene_shared.gsc.

Referenced by stop().

◆ _trigger_init()

function _trigger_init ( trig  )

Definition at line 3992 of file scene_shared.gsc.

References _init_instance(), a_ents, get_player_count(), and wait_till().

Referenced by __main__().

◆ _trigger_play()

function _trigger_play ( trig  )

Definition at line 4010 of file scene_shared.gsc.

References a_ents, get_player_count(), get_scenedef(), IS_TRUE, play(), and wait_till().

Referenced by __main__().

◆ _trigger_stop()

function _trigger_stop ( trig  )

Definition at line 4032 of file scene_shared.gsc.

References stop(), and wait_till().

Referenced by __main__().

◆ _wait_for_camera_animation()

function _wait_for_camera_animation ( str_cam  ,
n_start_time   
)

Definition at line 2499 of file scene_shared.gsc.

References _wait_server_time().

Referenced by loop_camera_anim_to_set_up_for_capture(), and play().

◆ _wait_for_ordered_notify()

function private _wait_for_ordered_notify ( id  ,
group_obj  ,
group_name  ,
str_note   
)

Definition at line 5596 of file scene_shared.gsc.

References _fire_ordered_notitifes().

Referenced by add_scene_ordered_notetrack().

◆ _wait_server_time()

function _wait_server_time ( n_time  ,
n_start_time  = 0 
)

Definition at line 2483 of file scene_shared.gsc.

Referenced by _wait_for_camera_animation().

◆ add_player_linked_scene()

function add_player_linked_scene ( linked_scene_str  )

Definition at line 5286 of file scene_shared.gsc.

References add(), and DEFAULT.

◆ add_scene_func()

function add_scene_func ( str_scenedef  ,
func  ,
str_state  = "play",
  ... 
)

Description:

"Summary: Adds a function to be called when a scene starts"
"Single Player / Multi Player: shared"

"Function Name: add_scene_func( str_scenedef, func, str_state = "play" )" "CallOn: level"
"Mandatory Argument(s): <str_scenedef> Name of scene"
"Mandatory Argument(s): <func> function to call when scene starts"
"Optional Argument(s): [str_state] set to "init" or "done" if you want to the function to get called in one of those states"

"Example:level scene::init( "my_scenes", "targetname" );"

Definition at line 4052 of file scene_shared.gsc.

References add(), DEFAULT, and get_scenedef().

◆ add_scene_ordered_notetrack()

function add_scene_ordered_notetrack ( group_name  ,
str_note   
)

Definition at line 5576 of file scene_shared.gsc.

References _wait_for_ordered_notify(), and DEFAULT.

◆ add_to_sync_list()

function add_to_sync_list ( )

Definition at line 1941 of file scene_shared.gsc.

References _n_request_time, add(), and DEFAULT.

Referenced by init().

◆ add_wait_for_streamer_hint_scene()

function add_wait_for_streamer_hint_scene ( str_scene_name  )

Definition at line 5660 of file scene_shared.gsc.

References add(), and DEFAULT.

◆ allows_multiple()

function allows_multiple ( )

Definition at line 3038 of file scene_shared.gsc.

References _s, and IS_TRUE.

Referenced by cSceneObject::_assign_unique_name(), and run_next().

◆ any_button_pressed()

function any_button_pressed ( )

Definition at line 5494 of file scene_shared.gsc.

Referenced by should_skip_scene_loop().

◆ assign_ents()

function assign_ents ( a_ents  )

◆ clear_scene_skipping_ui()

function clear_scene_skipping_ui ( )

◆ constructor()

constructor ( )

Definition at line 1893 of file scene_shared.gsc.

References _n_object_id, _n_streamer_req, and _str_mode.

◆ delete_scene_data()

function delete_scene_data ( str_scenename  )

Definition at line 4952 of file scene_shared.gsc.

◆ destroy_dev_info()

function destroy_dev_info ( )

Definition at line 2707 of file scene_shared.gsc.

◆ destructor()

destructor ( )

Definition at line 1900 of file scene_shared.gsc.

◆ display_dev_info()

function display_dev_info ( )

Definition at line 2703 of file scene_shared.gsc.

◆ finish_skip_scene()

function private finish_skip_scene ( )

◆ get_active_scene()

function get_active_scene ( str_scenedef  )

Definition at line 4936 of file scene_shared.gsc.

References get_name().

Referenced by _init_instance(), is_active(), is_playing(), and is_ready().

◆ get_active_scenes()

function get_active_scenes ( str_scenedef  )

Definition at line 4916 of file scene_shared.gsc.

References DEFAULT.

Referenced by is_active(), play(), skip_scene(), and stop().

◆ get_actor_count()

function get_actor_count ( str_scenedef  )

Description:

"Summary: returns the number of actors defined for a scene"
"Single Player / Multi Player: shared"

"Function Name: get_actor_count( str_scenedef )" "CallOn: Any"
"Mandatory Argument(s): <str_scenedef> scene definition name (from gdt)"
"Example:level scene::get_actor_count( "my_scene" );"

"Function Name: get_actor_count()" "CallOn: scene object"
"Example:s_scene scene::get_actor_count();"

Definition at line 4788 of file scene_shared.gsc.

References _get_type_count().

◆ get_align_ent()

function get_align_ent ( )

Definition at line 3007 of file scene_shared.gsc.

References _e_root, _s, _testing, error(), get_existing_ent(), STR, and warning().

Referenced by _play_camera_anims(), and play().

◆ get_anim_relative_start_time()

function get_anim_relative_start_time ( animation  ,
n_time   
)

Definition at line 2192 of file scene_shared.gsc.

References is_looping().

◆ get_ents()

function get_ents ( )

Definition at line 2982 of file scene_shared.gsc.

References _a_objects, a_ents, and ARRAY_ADD.

Referenced by _call_state_funcs(), and run_next().

◆ get_existing_ent()

function get_existing_ent ( str_name  ,
b_spawner_only  = false,
b_nodes_and_structs  = false 
)

◆ get_object_id()

function get_object_id ( )

Definition at line 2019 of file scene_shared.gsc.

References _n_object_id.

◆ get_objects()

function get_objects ( str_type  )

Definition at line 2179 of file scene_shared.gsc.

References _a_objects, a_ret, and ARRAY_ADD.

◆ get_player_count()

function get_player_count ( str_scenedef  )

Description:

"Summary: returns the number of players defined for a scene"
"Single Player / Multi Player: shared"

"Function Name: get_player_count( str_scenedef )" "CallOn: Any"
"Mandatory Argument(s): <str_scenedef> scene definition name (from gdt)"
"Example:level scene::get_player_count( "my_scene" );"

"Function Name: get_player_count()" "CallOn: scene object"
"Example:s_scene scene::get_player_count();"

Definition at line 4809 of file scene_shared.gsc.

References _get_type_count().

Referenced by _trigger_init(), and _trigger_play().

◆ get_prop_count()

function get_prop_count ( str_scenedef  )

Description:

"Summary: returns the number of props defined for a scene"
"Single Player / Multi Player: shared"

"Function Name: get_prop_count( str_scenedef )" "CallOn: Any"
"Mandatory Argument(s): <str_scenedef> scene definition name (from gdt)"
"Example:level scene::get_prop_count( "my_scene" );"

"Function Name: get_prop_count()" "CallOn: scene object"
"Example:s_scene scene::get_prop_count();"

Definition at line 4746 of file scene_shared.gsc.

References _get_type_count().

◆ get_root()

function get_root ( )

Definition at line 3002 of file scene_shared.gsc.

References _e_root.

◆ get_scenedef()

◆ get_scenedefs()

function get_scenedefs ( str_type  = "scene")

Definition at line 4103 of file scene_shared.gsc.

References ARRAY_ADD, and get_script_bundles().

◆ get_state()

function get_state ( )

Definition at line 3133 of file scene_shared.gsc.

References _str_state.

◆ get_valid_object_defs()

function get_valid_object_defs ( )

Definition at line 1966 of file scene_shared.gsc.

References _s, ARRAY_ADD, and IS_TRUE.

Referenced by init().

◆ get_valid_objects()

function get_valid_objects ( )

Definition at line 3113 of file scene_shared.gsc.

References _a_objects, and ARRAY_ADD.

Referenced by initialize(), and play().

◆ get_vehicle_count()

function get_vehicle_count ( str_scenedef  )

Description:

"Summary: returns the number of vehicles defined for a scene"
"Single Player / Multi Player: shared"

"Function Name: get_vehicle_count( str_scenedef )" "CallOn: Any"
"Mandatory Argument(s): <str_scenedef> scene definition name (from gdt)"
"Example:level scene::get_vehicle_count( "my_scene" );"

"Function Name: get_vehicle_count()" "CallOn: scene object"
"Example:s_scene scene::get_vehicle_count();"

Definition at line 4767 of file scene_shared.gsc.

References _get_type_count().

◆ has_init_state() [1/2]

function has_init_state ( )

Definition at line 2915 of file scene_shared.gsc.

References _a_objects.

Referenced by play(), and run_next().

◆ has_init_state() [2/2]

function has_init_state ( str_scenedef  )

Definition at line 4711 of file scene_shared.gsc.

References _has_init_state(), get_scenedef(), and IS_TRUE.

◆ has_next_scene()

function has_next_scene ( )

Definition at line 2726 of file scene_shared.gsc.

References _s.

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

◆ has_player()

function has_player ( )

Definition at line 3454 of file scene_shared.gsc.

◆ init() [1/2]

function init ( arg1  ,
arg2  ,
arg3  ,
b_test_run   
)

Description:

"Summary: Initializes a scene or multiple scenes"
"Single Player / Multi Player: shared"

"Function Name: init( str_val, str_key, ents )" "CallOn: level using KVP to specify the scene instances"
"Mandatory Argument(s): <str_val> value of the KVP of the scene entity"
"Mandatory Argument(s): <str_key> key of the KVP of the scene entity"
"Optional Argument(s): [ents] override the entities used for this scene"
"Example:level scene::init( "my_scenes", "targetname" );"

"Function Name: init( str_scenedef, ents )" "CallOn: level"
"Mandatory Argument(s): <str_scenedef> specify the scene name, will play all instances of this scene"
"Optional Argument(s): [ents] override the entities used for this scene"
"Example:level scene::init( "level1_scene_3" );"

"Function Name: init( str_scenedef, ents )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [str_scenedef] specify the scene name if needed"
"Optional Argument(s): [ents] override the entities used for this scene"
"Example:e_scene_root scene::init( "level1_scene_3" );"

"Function Name: init( ents, str_scenedef )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [ents] override the entities used for this scene"
"Optional Argument(s): [str_scenedef] specify the scene name if needed"
"Example:s_scene_object scene::init( array( e_guy1, e_guy2 ) );"

Definition at line 4206 of file scene_shared.gsc.

References _init_instance(), a_ents, and get_array().

◆ init() [2/2]

function init ( str_scenedef  ,
s_scenedef  ,
e_align  ,
a_ents  ,
b_test_run   
)

◆ init_scene_sequence_started()

function private init_scene_sequence_started ( b_started  )

◆ initialize()

function initialize ( a_ents  ,
b_playing  = false 
)

◆ is_active()

function is_active ( str_scenedef  )

Description:

"Summary: Checks if a scene is playing"
"Single Player / Multi Player: shared"

"Function Name: is_active( str_scenedef )" "CallOn: level or a scene instance"
"Optional Argument(s): [str_scenedef] The name of the scene to check"
"Example:level scene::is_active( "my_scene" );"
"Example:s_scene scene::is_active();"

Definition at line 4844 of file scene_shared.gsc.

References get_active_scene(), and get_active_scenes().

◆ is_capture_mode()

function is_capture_mode ( )

Definition at line 5052 of file scene_shared.gsc.

◆ is_igc()

◆ is_igc_active()

function is_igc_active ( )

Definition at line 5045 of file scene_shared.gsc.

References get().

Referenced by show_hud().

◆ is_looping()

function is_looping ( )

◆ is_player_anim_ending_early()

function is_player_anim_ending_early ( )

Definition at line 2216 of file scene_shared.gsc.

References _a_objects, and IS_EQUAL.

Referenced by cSceneObject::_finish_player().

◆ is_playing()

function is_playing ( str_scenedef  )

Description:

"Summary: Checks if a scene is playing"
"Single Player / Multi Player: shared"

"Function Name: is_playing( str_scenedef )"
"Optional Argument(s): [str_scenedef] The name of the scene to check"
"Example:s_scene scene::is_playing( "my_scene" );"
"Example:s_scene scene::is_playing();"

Definition at line 4866 of file scene_shared.gsc.

References DEFAULT, get(), get_active_scene(), and IS_EQUAL.

Referenced by _play_instance().

◆ is_ready()

function is_ready ( str_scenedef  )

Description:

"Summary: Checks if a scene is ready"
"Single Player / Multi Player: shared"

"Function Name: is_ready( str_scenedef )"
"Optional Argument(s): [str_scenedef] The name of the scene to check"
"Example:s_scene scene::is_ready( "my_scene" );"
"Example:s_scene scene::is_ready();"

Definition at line 4896 of file scene_shared.gsc.

References DEFAULT, get(), and get_active_scene().

◆ is_scene_shared()

function is_scene_shared ( )

Definition at line 3138 of file scene_shared.gsc.

References _a_objects, _s, is_igc(), and IS_TRUE.

Referenced by _skip_scene(), and play().

◆ is_scene_shared_sequence()

function private is_scene_shared_sequence ( )

Definition at line 3346 of file scene_shared.gsc.

References _s.

Referenced by cSceneObject::_finish_player(), play(), run_next(), and stop().

◆ is_skipping_in_progress()

function is_skipping_in_progress ( )

Definition at line 5310 of file scene_shared.gsc.

◆ is_skipping_player_scene()

function is_skipping_player_scene ( )

Definition at line 2721 of file scene_shared.gsc.

References _s, _str_mode, and IS_TRUE.

Referenced by run_next(), and skip_scene().

◆ is_skipping_scene()

◆ is_valid_ent()

function is_valid_ent ( ent  )

Definition at line 3676 of file scene_shared.gsc.

References is_dead_sentient().

Referenced by get_existing_ent().

◆ loop_camera_anim_to_set_up_for_capture()

function loop_camera_anim_to_set_up_for_capture ( )

Definition at line 2615 of file scene_shared.gsc.

References _play_camera_anims(), _s, and _wait_for_camera_animation().

Referenced by play().

◆ new_object()

Definition at line 1961 of file scene_shared.gsc.

Referenced by init().

◆ on_error()

function on_error ( )

Definition at line 3128 of file scene_shared.gsc.

References stop().

◆ on_load_wait()

function on_load_wait ( )

Definition at line 3969 of file scene_shared.gsc.

References set(), and wait_network_frame().

Referenced by __main__().

◆ on_player_connect()

function on_player_connect ( )

Definition at line 5559 of file scene_shared.gsc.

References watch_scene_skip_requests().

Referenced by __init__().

◆ on_player_disconnect()

function on_player_disconnect ( )

Definition at line 5567 of file scene_shared.gsc.

References set_igc_active().

Referenced by __init__().

◆ play() [1/4]

function play ( arg1  ,
arg2  ,
arg3  ,
b_test_run  = false,
str_state  ,
str_mode  = "" 
)

Description:

"Summary: Plays a scene or multiple scenes"
"Single Player / Multi Player: shared"

"Function Name: play( str_val, str_key, ents )" "CallOn: level using KVP to specify the scene instances"
"Mandatory Argument(s): <str_val> value of the KVP of the scene entity"
"Mandatory Argument(s): <str_key> key of the KVP of the scene entity"
"Optional Argument(s): [ents] override the entities used for this scene"
"Example:level scene::play( "my_scenes", "targetname" );"

"Function Name: play( str_scenedef, ents )" "CallOn: level"
"Mandatory Argument(s): <str_scenedef> specify the scene name, will play all instances of this scene"
"Optional Argument(s): [ents] override the entities used for this scene"

"Example:level scene::play( "level1_scene_3" );"

"Function Name: play( str_scenedef, ents )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [str_scenedef] specify the scene name if needed"
"Optional Argument(s): [ents] override the entities used for this scene"

"Example:e_scene_root scene::play( "level1_scene_3" );"

"Function Name: play( ents, str_scenedef )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [ents] override the entities used for this scene"
"Optional Argument(s): [str_scenedef] specify the scene name if needed"
"Example:s_scene_object scene::play( array( e_guy1, e_guy2 ) );"

Definition at line 4407 of file scene_shared.gsc.

References _play_instance(), a_ents, get_active_scenes(), and get_array().

◆ play() [2/4]

function new_object::play ( str_alert_state  )

Definition at line 3455 of file scene_shared.gsc.

References _a_objects, and IS_EQUAL.

◆ play() [3/4]

function play ( str_awareness_state  = "low_alert")

◆ play() [4/4]

◆ prepare_generic_model_anim()

function private prepare_generic_model_anim ( ent  )

Definition at line 45 of file scene_shared.gsc.

References IS_EQUAL.

Referenced by cSceneObject::_prepare().

◆ prepare_player_model_anim()

function private prepare_player_model_anim ( ent  )

Definition at line 35 of file scene_shared.gsc.

References IS_EQUAL.

Referenced by cSceneObject::_prepare().

◆ remove_from_sync_list()

function remove_from_sync_list ( )

Definition at line 1948 of file scene_shared.gsc.

References _n_request_time.

Referenced by stop().

◆ remove_invalid_scene_objects()

function remove_invalid_scene_objects ( s_scenedef  )

Definition at line 3886 of file scene_shared.gsc.

References ARRAY_ADD, and IS_EQUAL.

◆ remove_player_linked_scene()

function remove_player_linked_scene ( linked_scene_str  )

Definition at line 5293 of file scene_shared.gsc.

◆ remove_scene_func()

function remove_scene_func ( str_scenedef  ,
func  ,
str_state  = "play" 
)

Description:

"Summary: Removes a function to be called when a scene starts"
"Single Player / Multi Player: shared"

"Function Name: remove_scene_func( str_scenedef, func, str_state = "play" )" "CallOn: level"
"Mandatory Argument(s): <str_scenedef> Name of scene"
"Mandatory Argument(s): <func> function to remove"
"Optional Argument(s): [str_state] set to "init" or "done" if you want to the function to get removed from one of those states"
"Example:level scene::init( "my_scenes", "targetname" );"

Definition at line 4078 of file scene_shared.gsc.

References DEFAULT, and get_scenedef().

◆ run_instances()

function run_instances ( )

◆ run_next()

◆ scene_disable_player_stuff()

function scene_disable_player_stuff ( b_hide_hud  = true)

◆ scene_enable_player_stuff()

function scene_enable_player_stuff ( b_hide_hud  = true)

Definition at line 4989 of file scene_shared.gsc.

References set_igc_active(), and show_hud().

Referenced by cSceneObject::_finish_player(), and _stop_camera_anim_on_player().

◆ set_igc_active()

function set_igc_active ( b_in_igc  )

◆ should_skip_linked_to_players_scene()

function should_skip_linked_to_players_scene ( )

Definition at line 3336 of file scene_shared.gsc.

References _s, and IS_TRUE.

Referenced by _play_instance().

◆ should_skip_scene_loop()

function should_skip_scene_loop ( )

◆ should_spectate_on_join()

function should_spectate_on_join ( )

Definition at line 5066 of file scene_shared.gsc.

References IS_TRUE.

◆ skip_scene() [1/2]

◆ skip_scene() [2/2]

function skip_scene ( scene_name  ,
b_sequence  ,
b_player_scene  ,
b_check_linked_scene   
)

Definition at line 5081 of file scene_shared.gsc.

References _skip_scene(), get_active_scenes(), get_array(), and IS_TRUE.

◆ skipto_end()

function skipto_end ( arg1  ,
arg2  ,
arg3  ,
n_time  ,
b_include_players  = false 
)

Description:

"Summary: Skipts a scene or multiple scenes to the end state (last frame or looping animation). Look at scene::play() for all the various ways this can be called."
"Single Player / Multi Player: shared"
"Optional Argument(s): [n_time] Value between 0 and 1 to only skip through a portion of the scene. 0 will start at the beginning of the scene, 1 skips completely to the end."
"Example:level scene::skipto_end( "my_scene" );"

Definition at line 4563 of file scene_shared.gsc.

References play().

◆ skipto_end_noai()

function skipto_end_noai ( arg1  ,
arg2  ,
arg3  ,
n_time   
)

Description:

"Summary: Skipts a scene or multiple scenes to the end state (last frame or looping animation), but skips AI. Look at scene::play() for all the various ways this can be called."
"Single Player / Multi Player: shared"
"Optional Argument(s): [n_time] Value between 0 and 1 to only skip through a portion of the scene. 0 will start at the beginning of the scene, 1 skips completely to the end."
"Example:level scene::skipto_end_noai( "my_scene" );"

Definition at line 4587 of file scene_shared.gsc.

References play().

◆ spawn()

function spawn ( arg1  ,
arg2  ,
arg3  ,
arg4  ,
b_test_run   
)

Description:

"Summary: Spawns a scene"
"Single Player / Multi Player: shared"

"Function Name: spawn( str_scenedef, v_origin, v_angles, ents )" "CallOn: NA <br/>"Mandatory Argument(s): <str_scenedef> Name of scene to spawn" <br/>"Optional Argument(s): [v_origin] The origin to spawn the scene at - defaults to (0, 0, 0)" <br/>"Optional Argument(s): [v_angles] The angles to spawn the scene at - defaults to (0, 0, 0)" <br/>"Optional Argument(s): [a_ents] Entities to use for the scene" <br/>"Example:level scene::spawn( "my_scene", (99, 45, 156) );"

"Function Name: spawn( str_scenedef, ents, v_origin, v_angles )" "CallOn: NA <br/>"Mandatory Argument(s): <str_scenedef> Name of scene to spawn" <br/>"Optional Argument(s): [a_ents] Entities to use for the scene" <br/>"Optional Argument(s): [v_origin] The origin to spawn the scene at - defaults to (0, 0, 0)" <br/>"Optional Argument(s): [v_angles] The angles to spawn the scene at - defaults to (0, 0, 0)" <br/>"Example:level scene::spawn( "my_scene", array( my_ent1, my_ent2 ) );"

Definition at line 4141 of file scene_shared.gsc.

References a_ents, and init().

Referenced by cSceneObject::spawn_ent().

◆ stop() [1/2]

function stop ( arg1  ,
arg2  ,
arg3   
)

Description:

"Summary: Stops a scene or multiple scenes"
"Single Player / Multi Player: shared"

"Function Name: stop( str_val, str_key, b_clear )" "CallOn: level using KVP to specify the scene instances"
"Mandatory Argument(s): <str_val> value of the KVP of the scene entity"
"Mandatory Argument(s): <str_key> key of the KVP of the scene entity"
"Optional Argument(s): [b_clear] optionally delete the ents if they were spawned by the scene, regardless of options in scene definition"

"Example:level scene::stop( "my_scenes", "targetname" );"

"Function Name: stop( str_scenedef, b_clear )" "CallOn: level"
"Mandatory Argument(s): <str_scenedef> specify the scene name, will stop all instances of this scene"
"Optional Argument(s): [b_clear] optionally delete the ents if they were spawned by the scene, regardless of options in scene definition"
"Example:level scene::stop( "level1_scene_3" );"

"Function Name: stop( str_scenedef, b_clear )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [str_scenedef] specify the scene name if multiple scenes are running on the entity"
"Optional Argument(s): [b_clear] optionally delete the ents if they were spawned by the scene, regardless of options in scene definition"
"Example:e_my_scene scene::stop( "level1_scene_3" );"

"Function Name: stop( b_clear, str_scenedef )" "CallOn: Any entity (script_origin, script_struct, ai, script_model, script_brushmodel, player)"
"Optional Argument(s): [b_clear] optionally delete the ents if they were spawned by the scene, regardless of options in scene definition"
"Optional Argument(s): [str_scenedef] specify the scene name if multiple scenes are running on the entity"
"Example:s_scene_object scene::stop( true );"

Definition at line 4632 of file scene_shared.gsc.

References _stop_instance(), get_active_scenes(), and get_array().

◆ stop() [2/2]

◆ streamer_request_completed()

function streamer_request_completed ( )

Definition at line 2810 of file scene_shared.gsc.

References _s.

Referenced by play(), run_next(), and stop().

◆ sync_with_client_scene()

function sync_with_client_scene ( str_state  ,
b_test_run  = false 
)

Definition at line 2025 of file scene_shared.gsc.

References _s, is_igc(), set(), and wait_till_scene_ready().

Referenced by initialize(), play(), and stop().

◆ sync_with_other_scenes()

function sync_with_other_scenes ( )

Definition at line 3104 of file scene_shared.gsc.

References _n_request_time, _s, and IS_TRUE.

Referenced by wait_till_scene_ready().

◆ synced_delete()

function synced_delete ( )

Definition at line 3681 of file scene_shared.gsc.

References WAIT_SERVER_FRAME.

Referenced by cSceneObject::finish().

◆ trigger_scene_sequence_started()

function private trigger_scene_sequence_started ( scene_object  ,
entity   
)

Definition at line 3427 of file scene_shared.gsc.

References _s, _str_state, init_scene_sequence_started(), is_igc(), is_skipping_scene(), and IS_TRUE.

Referenced by play().

◆ update_scene_sequence()

function private update_scene_sequence ( )

Definition at line 3351 of file scene_shared.gsc.

References _s.

Referenced by init_scene_sequence_started(), and play().

◆ updateIGCViewtime()

function updateIGCViewtime ( b_in_igc  )

Definition at line 5007 of file scene_shared.gsc.

Referenced by set_igc_active().

◆ wait_till_scene_ready()

function wait_till_scene_ready ( o_exclude  ,
b_ignore_streamer  = false 
)

◆ wait_until_spectate_on_join_completes()

function wait_until_spectate_on_join_completes ( )

Definition at line 5071 of file scene_shared.gsc.

References IS_TRUE.

◆ waittill_skip_sequence_completed()

function waittill_skip_sequence_completed ( )

Definition at line 5302 of file scene_shared.gsc.

Referenced by init_scene_sequence_started().

◆ watch_scene_ending()

function watch_scene_ending ( )

Definition at line 5356 of file scene_shared.gsc.

References clear_scene_skipping_ui().

Referenced by watch_scene_skip_requests().

◆ watch_scene_skip_requests()

function watch_scene_skip_requests ( )

◆ watch_scene_skipping()

function watch_scene_skipping ( )

Definition at line 5366 of file scene_shared.gsc.

References clear_scene_skipping_ui().

Referenced by watch_scene_skip_requests().

Variable Documentation

◆ _e_root

◆ _n_object_id

var _n_object_id

Definition at line 1887 of file scene_shared.gsc.

Referenced by constructor(), and get_object_id().

◆ _n_request_time

var _n_request_time

◆ _n_streamer_req

var _n_streamer_req

Definition at line 1891 of file scene_shared.gsc.

Referenced by constructor(), init(), play(), and wait_till_scene_ready().

◆ _str_mode

var _str_mode

◆ _str_notify_name

var _str_notify_name

Definition at line 1889 of file scene_shared.gsc.

Referenced by _call_state_funcs(), init(), initialize(), play(), and stop().

◆ _str_state

var _str_state

◆ a_objects

function _assign_ents_by_type a_objects
Initial value:
{
if ( ‪a_ents.size )
{
foreach ( str_name, e_ent in ArrayCopy( ‪a_ents ) )
{
foreach ( i, o_obj in ArrayCopy( ‪a_objects ) )
{
if ( isdefined( o_obj._s.name ) && ( ‪STR( o_obj._s.name ) == ToLower( ‪STR( str_name ) ) ) )
{
o_obj._e = e_ent;
ArrayRemoveIndex( ‪a_ents, str_name, true );
ArrayRemoveIndex( ‪a_objects, i );
break;
}
}
}
/#
foreach ( i, ent in ‪a_ents )
{
‪error( IsString( i ), "No scene object with name '" + i + "'." );
}
}
return ‪a_ents.size

Definition at line 2101 of file scene_shared.gsc.

Referenced by assign_ents(), and wait_till_scene_ready().

◆ array

function wait_till_objects_ready array
Initial value:
{
do
{
recheck = false;
foreach ( ent in ‪array )
{
if ( isdefined( ent ) && !ent ‪flagsys::get( "ready" ) )
{
ent ‪util::waittill_either( "death", "ready" );
recheck = true;
break;
}
}
}
while ( recheck )

Definition at line 3086 of file scene_shared.gsc.

‪clear
‪function clear(str_flag)
Definition: flag_shared.csc:130
‪waittill_either
‪function waittill_either(msg1, msg2)
Definition: util_shared.gsc:303
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪error
‪function error(msg)
Definition: _util.gsc:28
‪a_objects
‪function _assign_ents_by_name a_objects
Definition: scene_shared.gsc:2101
‪STR
‪#define STR(__var)
Definition: shared.gsh:297
‪a_ents
‪function _query_ents_by_substring_helper a_ents
Definition: util_shared.gsc:3334
‪array
‪function wait_till_objects_ready array
Definition: scene_shared.gsc:3086