Difference between revisions of "WD2 ScriptHook: Lua Functions"
From Nomad DB
Line 1: | Line 1: | ||
[[WD2 ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WD2 Lua Functions|built-in Lua functions]] and [[WD2 Lua Classes|Game classes]] and provide additional functionality. | [[WD2 ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WD2 Lua Functions|built-in Lua functions]] and [[WD2 Lua Classes|Game classes]] and provide additional functionality. | ||
− | == Generic == | + | ==Generic== |
− | |||
− | + | *[[include]] | |
− | * [[ | ||
− | |||
− | |||
− | === | + | ===Script=== |
− | |||
− | |||
− | == Game Functions == | + | *[[WD2 ScriptHook: Script Table|Script()]] |
− | === Player === | + | *[[ScriptHook.RegisterKeyHandler]] |
− | * [[ScriptHook.AddInventoryItem]] | + | *[[ScriptHook.RegisterCommand]] |
− | * [[ScriptHook.Teleport]] | + | |
− | * [[ScriptHook.SetGraphicKitModel]] | + | ===UI=== |
− | * [[ScriptHook.SetLocalPlayerNoclip]] | + | |
− | * [[ScriptHook.HasLocalPlayerNoclip]] | + | *[[UI.SimpleMenu]] |
+ | *[[ScriptHook.ShowNotification]] | ||
+ | |||
+ | ==Game Functions== | ||
+ | ===Player=== | ||
+ | |||
+ | *[[ScriptHook.AddInventoryItem]] | ||
+ | *[[ScriptHook.Teleport]] | ||
+ | *[[ScriptHook.SetGraphicKitModel]] | ||
+ | *[[ScriptHook.SetLocalPlayerNoclip]] | ||
+ | *[[ScriptHook.HasLocalPlayerNoclip]] | ||
+ | |||
+ | ===Entity=== | ||
+ | |||
+ | *[[ScriptHook.SpawnEntityFromArchetypeHash]] | ||
+ | *[[ScriptHook.GetArchetypeHashByEntityId]] | ||
+ | *[[ScriptHook.GetGraphicKitModelByEntityId]] | ||
+ | *[[ScriptHook.SetEntityGraphicKitModel]] | ||
+ | |||
+ | ===Vehicle=== | ||
+ | |||
+ | *[[ScriptHook.RepairLocalPlayerVehicle]] | ||
+ | |||
+ | ===Felony=== | ||
+ | |||
+ | *[[ScriptHook.ToggleFelonySystem]] | ||
+ | *[[ScriptHook.SetHeatLevel]] | ||
+ | *[[ScriptHook.ClearHeatLevel]] | ||
+ | |||
+ | ===Game=== | ||
+ | |||
+ | *[[ScriptHook.SetProgression]] | ||
+ | |||
+ | === Camera === | ||
+ | |||
+ | * [[ScriptHook.CameraSetCustom]] | ||
+ | * [[ScriptHook.CameraReset]] | ||
* [[ScriptHook.SetLocalPlayerFreeCamera]] | * [[ScriptHook.SetLocalPlayerFreeCamera]] | ||
− | * [[ScriptHook.HasLocalPlayerFreeCamera]] | + | *[[ScriptHook.HasLocalPlayerFreeCamera]] |
− | + | ||
− | + | ==Utility== | |
− | + | ===timer=== | |
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | === | ||
− | |||
− | + | *[[timer.Create]] | |
− | + | *[[timer.Simple]] | |
− | * [[timer.Create]] | + | *[[timer.Get]] |
− | * [[timer.Simple]] | + | *[[timer.Remove]] |
− | * [[timer.Get]] | + | *[[timer.RemoveIfExists]] |
− | * [[timer.Remove]] | ||
− | * [[timer.RemoveIfExists]] |
Revision as of 18:34, 20 April 2020
ScriptHook registers custom Lua functions to the game's scripting system. These functions extend the built-in Lua functions and Game classes and provide additional functionality.
Contents
Generic
Script
UI
Game Functions
Player
- ScriptHook.AddInventoryItem
- ScriptHook.Teleport
- ScriptHook.SetGraphicKitModel
- ScriptHook.SetLocalPlayerNoclip
- ScriptHook.HasLocalPlayerNoclip
Entity
- ScriptHook.SpawnEntityFromArchetypeHash
- ScriptHook.GetArchetypeHashByEntityId
- ScriptHook.GetGraphicKitModelByEntityId
- ScriptHook.SetEntityGraphicKitModel
Vehicle
Felony
Game
Camera
- ScriptHook.CameraSetCustom
- ScriptHook.CameraReset
- ScriptHook.SetLocalPlayerFreeCamera
- ScriptHook.HasLocalPlayerFreeCamera