Saints Row 2 Function Reference

Global functions

These functions are assumed to be globally available to all scripts (they aren't defined in the available Lua files, or are defined in files that are known to be always loaded).

This list is assumed incomplete; additional functions could exist in the exe but not be used in the game scripts, and there's no definitive list of Lua files that are always loaded.

Function name Global Defined in Examples from patch (click blue number to expand)
objective_text true
    59
    objective_text_clear true
      49
      object_indicator_add_do true
        3
        • game_lib.lua, line 2182: if (object_indicator_add_do( object_name, object_indicator_id, object_indicator_flags, sync_type, fade_dist, tag_name ) == true) then
        • game_lib.lua, line 2274: object_indicator_add_do(trigger_name, object_indicator_id, object_indicator_flags, sync_type, fade_dist)
        • game_lib.lua, line 2777: if (object_indicator_add_do(object_name, asset_id, flags, sync_type, fade_dist) == true) then
        object_indicator_add_script_group_do true
          2
          • game_lib.lua, line 2214: object_indicator_add_script_group_do( group_name, object_indicator_id, object_indicator_flags, sync_type )
          • game_lib.lua, line 2807: object_indicator_add_script_group_do(group_name, asset_id, flags, sync_type)
          object_indicator_init_lua true
            1
            object_indicator_remove_do true
              3
              object_indicator_remove_script_group_do true
                2
                object_is_in_trigger true
                  6
                  • mflighttutorial.lua, line 1427: if local_player_hit_last_trigger == false and object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, LOCAL_PLAYER ) and player_is_standing( LOCAL_PLAYER ) then
                  • mflighttutorial.lua, line 1433: if remote_player_hit_last_trigger == false and object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, REMOTE_PLAYER ) and player_is_standing( REMOTE_PLAYER ) then
                  • mflighttutorial.lua, line 1442: while not ( object_is_in_trigger( mFlightTutorial_trigger.end_trigger.name, LOCAL_PLAYER ) and player_is_standing( LOCAL_PLAYER ) ) do
                  • mflighttutorial.lua, line 2894: while not ( object_is_in_trigger( mFlightTutorial_trigger.dive_trigger_01.name, player ) and player_is_standing( player ) ) do
                  • mflighttutorial.lua, line 2939: while not ( object_is_in_trigger( mFlightTutorial_trigger.flap_trigger_01.name, player ) and player_is_standing( player ) and (Remote_CollectedOrb_B == true)) do
                  • mflighttutorial.lua, line 2943: while not ( object_is_in_trigger( mFlightTutorial_trigger.flap_trigger_01.name, player ) and player_is_standing( player ) and (Local_CollectedOrb_A == true)) do
                  object_spawn_pause true
                    4
                    online_and_privilege_validator_begin true 1 12
                    online_validator_check_privs true 1 1
                    online_validator_profile_cb true 1
                      online_validator_set_checking true
                        11
                        online_validator_sign_in_cb true 1
                          on_alt_select true
                            1
                            on_anim_trigger true
                              6
                              on_back true
                                2
                                on_cancel true
                                  1
                                  on_cancel_confirm true
                                    1
                                    on_change true
                                      6
                                      on_death true
                                        53
                                        on_dismiss true
                                          11
                                          on_door_opened true
                                            4
                                            on_enter true
                                              5
                                              on_nav true
                                                18
                                                on_notoriety_event true
                                                  4
                                                  on_pickup true
                                                    5
                                                    on_placed_waypoint true
                                                      6
                                                      on_powers_tutorial_completed true
                                                        3
                                                        on_purchase true
                                                          4
                                                          on_respawn true
                                                            5
                                                            on_revived true
                                                              2
                                                              on_seamless_animated_moment_end true
                                                                29
                                                                on_select true
                                                                  5
                                                                  on_show true
                                                                    1
                                                                    on_start true
                                                                      1
                                                                      on_sub_menu_fill true
                                                                        1
                                                                        on_superpower_equip true
                                                                          14
                                                                          on_take_damage true
                                                                            23
                                                                            on_trigger true
                                                                              11
                                                                              on_trigger_exit true
                                                                                5
                                                                                on_value_update true
                                                                                  3
                                                                                  on_vehicle_destroyed true
                                                                                    2
                                                                                    on_vehicle_enter_water true
                                                                                      2
                                                                                      open_vint_dialog_check_done true
                                                                                        2
                                                                                        open_vint_dialog_do true
                                                                                          1
                                                                                          option_menu_init_data true
                                                                                            1
                                                                                            os_set_gpu_reserve_state true
                                                                                              4
                                                                                              outro_did_selection true
                                                                                                1
                                                                                                outro_is_client true
                                                                                                  4
                                                                                                  outro_send_multiplayer_nav_event true
                                                                                                    1
                                                                                                    outro_send_multiplayer_select_event true
                                                                                                      1
                                                                                                      out_func true
                                                                                                        1