Saints Row 2 Function Reference

Global functions

These functions are assumed to be globally available to all scripts since they aren't defined in the patch lua files.

This list is incomplete; additional functions could exist in the exe but not be used in the game lua, and some lua files may always be loaded (system_lib.lua?) making their functions essentially global.

Function name Global Defined in Examples from patch (click blue number to expand)
helicopters_set_jitter_override true
    3
    helicopter_enter_retreat true
      2
      helicopter_fly_to_do true
        2
        • ug_lib.lua, line 1250: if (helicopter_fly_to_do(name, speed, direct, follow, continue_at_goal, num_args, path[1])) then
        • ug_lib.lua, line 1263: if (helicopter_fly_to_do(name, speed, direct, follow, continue_at_goal, num_args, path)) then
        helicopter_go_to_change_follow_target true
          1
          • ss03.lua, line 849: helicopter_go_to_change_follow_target( HELICOPTER_NAME, Lead_car_name )
          helicopter_go_to_clear_follow_target true
            1
            helicopter_go_to_set_target true
              1
              helicopter_set_dont_move_in_combat true
                3
                helicopter_set_dont_use_constraints true
                  4
                  helicopter_set_max_bank_angle true
                    2
                    • ss03.lua, line 368: helicopter_set_max_bank_angle( HELICOPTER_NAME, HELI_MAX_BANK_ANGLE )
                    • ss03.lua, line 400: helicopter_set_max_bank_angle( HELICOPTER_NAME, HELI_MAX_BANK_ANGLE )
                    helicopter_set_missile_chance true
                      5
                      helicopter_shoot_human true
                        1
                        helicopter_shoot_navpoint true
                          8
                          hide true
                            1
                            homie_mission_lock true
                              4
                              homie_mission_unlock true
                                4
                                hud_bar_off true
                                  28
                                  hud_bar_on true
                                    23
                                    hud_bar_set_range true
                                      18
                                      hud_bar_set_value true
                                        47
                                        hud_hide true
                                          11
                                          hud_open_chat_all_window true
                                            2
                                            hud_open_chat_team_window true
                                              1
                                              hud_set_fake_notoriety true
                                                2
                                                hud_timer_get_remainder true
                                                  6
                                                  hud_timer_hide true
                                                    10
                                                    hud_timer_pause true
                                                      12
                                                      hud_timer_stop true
                                                        98
                                                        hud_update_inventory true
                                                          1
                                                          human_shielding_disabled true
                                                            15