Difference between revisions of "WD2 ScriptHook: Lua Functions"

From Nomad DB
(2 intermediate revisions by the same user not shown)
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 ===
+
*[[include]]
* [[WD2 ScriptHook: Script Table|Script()]]
 
* [[ScriptHook.RegisterKeyHandler]]
 
* [[ScriptHook.RegisterCommand]]
 
  
=== UI ===
+
===Script===
* [[UI.SimpleMenu]]
 
* [[ScriptHook.ShowNotification]]
 
  
== Game Functions ==
+
*[[WD2 ScriptHook: Script Table|Script()]]
=== Player ===
+
*[[ScriptHook.RegisterKeyHandler]]
* [[ScriptHook.AddInventoryItem]]
+
*[[ScriptHook.RegisterCommand]]
* [[ScriptHook.Teleport]]
 
* [[ScriptHook.SetGraphicKitModel]]
 
* [[ScriptHook.SetLocalPlayerNoclip]]
 
* [[ScriptHook.HasLocalPlayerNoclip]]
 
* [[ScriptHook.SetLocalPlayerFreeCamera]]
 
* [[ScriptHook.HasLocalPlayerFreeCamera]]
 
=== Entity ===
 
* [[ScriptHook.SpawnEntityFromArchetypeHash]]
 
* [[ScriptHook.GetArchetypeHashByEntityId]]
 
* [[ScriptHook.GetGraphicKitModelByEntityId]]
 
* [[ScriptHook.SetEntityGraphicKitModel]]
 
=== Vehicle ===
 
* [[ScriptHook.RepairLocalPlayerVehicle]]
 
=== Felony ===
 
* [[ScriptHook.ToggleFelonySystem]]
 
* [[ScriptHook.SetHeatLevel]]
 
* [[ScriptHook.ClearHeatLevel]]
 
=== Game ===
 
* [[ScriptHook.SetProgression]]
 
  
== Utility ==
+
===UI===
=== timer ===
+
 
* [[timer.Create]]
+
*[[UI.SimpleMenu]]
* [[timer.Simple]]
+
*[[ScriptHook.ShowNotification]]
* [[timer.Get]]
+
*[[ScriptHook.IsIngameUIEnabled]]
* [[timer.Remove]]
+
 
* [[timer.RemoveIfExists]]
+
==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]]
 +
*[[ScriptHook.ToggleWorldSpawner]]
 +
*[[ScriptHook.IsWorldSpawnerEnabled]]
 +
*[[ScriptHook.ToggleWorldImpostor]]
 +
*[[ScriptHook.IsWorldImpostorEnabled]]
 +
 
 +
===Camera===
 +
 
 +
*[[ScriptHook.CameraSetCustom]]
 +
*[[ScriptHook.CameraReset]]
 +
*[[ScriptHook.SetLocalPlayerFreeCamera]]
 +
*[[ScriptHook.HasLocalPlayerFreeCamera]]
 +
 
 +
==Utility==
 +
===timer===
 +
 
 +
*[[timer.Create]]
 +
*[[timer.Simple]]
 +
*[[timer.Get]]
 +
*[[timer.Remove]]
 +
*[[timer.RemoveIfExists]]

Revision as of 18:43, 3 May 2020