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)
teleport true
    121
    teleport_check_done true
      1
      teleport_vehicle true
        37
        thread_check_done true
          18
          thread_kill true
            300
            thread_new_block true
              2
              thread_yield true
                674
                tonumber true
                  1
                  trigger_enable true
                    880
                    trigger_get_all_with_prefix true
                      1
                      • rn07.lua, line 617: local area_entrances = { trigger_get_all_with_prefix(area_entrance_prefix) }
                      trigger_set_delay_between_activations true
                        12
                        trigger_type_enable true
                          24
                          try_and_create_profile true
                            1
                            try_and_login_to_gamespy true
                              1
                              turn_angle_do true
                                1
                                turn_invulnerable true
                                  138
                                  turn_to_do true
                                    1
                                    turn_vulnerable true
                                      112
                                      tutorial_completed true
                                        3
                                        tutorial_lock true
                                          1
                                          tutorial_start true
                                            28
                                            tutorial_unlock true
                                              1