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)
helicopters_set_jitter_override true
    3
    helicopter_enter_retreat true
      2
      helicopter_fly_to true 1 12
      helicopter_fly_to_direct true 1 37
      helicopter_fly_to_direct_dont_stop true 1 1
      helicopter_fly_to_direct_follow true 1 1
      • ss03.lua, line 776: helicopter_fly_to_direct_follow( HELICOPTER_NAME, HELICOPTER_FOLLOW_LOOP_PATH_SPEEDS[index], Lead_car_name, path_name )
      helicopter_fly_to_direct_follow_dont_stop true 1 2
      • ss03.lua, line 768: helicopter_fly_to_direct_follow_dont_stop( HELICOPTER_NAME, HELICOPTER_FOLLOW_PATH_SPEEDS[index], Lead_car_name, path_name )
      • ss03.lua, line 778: helicopter_fly_to_direct_follow_dont_stop( HELICOPTER_NAME, HELICOPTER_FOLLOW_LOOP_PATH_SPEEDS[index], Lead_car_name, path_name )
      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_fly_to_dont_stop true 1
          helicopter_fly_to_follow true 1
            helicopter_fly_to_follow_dont_stop true 1
              helicopter_fly_to_internal true 1 8
              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