Difference between revisions of "WDL ScriptHook: Lua Functions"
From Nomad DB
(Created page with "{{Page_WDL}} ScriptHook registers custom Lua functions to the game's scripting system. These functions extend the WDL Lua Functions|built-in Lua funct...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Page_WDL}} | {{Page_WDL}} | ||
[[WDL ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WDL Lua Functions|built-in Lua functions]] and [[WDL Lua Classes|Game classes]] and provide additional functionality. | [[WDL ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WDL Lua Functions|built-in Lua functions]] and [[WDL Lua Classes|Game classes]] and provide additional functionality. | ||
+ | |||
+ | '''If you have used WD2 or MDE ScriptHook, check out the list of [[WDL Scripting Changes|notable ScriptHook changes for Legion]]'''. | ||
==Generic== | ==Generic== | ||
Line 24: | Line 26: | ||
*[[ScriptHook.SetLocalPlayerNoclip]] | *[[ScriptHook.SetLocalPlayerNoclip]] | ||
*[[ScriptHook.HasLocalPlayerNoclip]] | *[[ScriptHook.HasLocalPlayerNoclip]] | ||
+ | *[[ScriptHook.SetNoclipSpeeds]] | ||
===Entity=== | ===Entity=== | ||
Line 33: | Line 36: | ||
*[[ScriptHook.EntityHasComponent]] | *[[ScriptHook.EntityHasComponent]] | ||
*[[ScriptHook.GetEntityClassName]] | *[[ScriptHook.GetEntityClassName]] | ||
+ | |||
+ | *[[ScriptHook.SetEntityIsStatic]] | ||
+ | *[[ScriptHook.SetEntityIsPersistent]] | ||
+ | *[[ScriptHook.SetEntityPoolClearOnUnused]] | ||
+ | *[[ScriptHook.SetEntityIsPoolable]] | ||
+ | *[[ScriptHook.SetEntityPhysicsEnabled]] | ||
+ | *[[ScriptHook.SetEntityIsVisible]] | ||
+ | |||
+ | * [[ScriptHook.GetEntityAABB]] | ||
+ | * [[ScriptHook.GetEntityLocalAABB]] | ||
+ | * [[ScriptHook.HasEntityUserLocalBBox]] | ||
+ | * [[ScriptHook.RemoteEntity]] | ||
+ | * [[ScriptHook.IsEntityLoaded]] | ||
+ | * [[ScriptHook.IsEntityInitialized]] | ||
+ | * [[ScriptHook.IsEntityAddedToWorld]] | ||
+ | * [[ScriptHook.IsEntityMoving]] | ||
+ | * [[ScriptHook.IsEntityShuttingDown]], | ||
+ | * [[ScriptHook.IsEntitySleeping]] | ||
+ | * [[ScriptHook.SetEntitySleep]] | ||
+ | * [[ScriptHook.SetEntityIsVisible]] | ||
+ | * [[ScriptHook.IsEntityVisible]] | ||
===Vehicle=== | ===Vehicle=== | ||
Line 40: | Line 64: | ||
===Game=== | ===Game=== | ||
− | *[[ScriptHook. | + | *[[ScriptHook.SetWorldSpawnerEnabled]] |
*[[ScriptHook.IsWorldSpawnerEnabled]] | *[[ScriptHook.IsWorldSpawnerEnabled]] | ||
− | *[[ScriptHook. | + | *[[ScriptHook.SetWorldImpostorEnabled]] |
*[[ScriptHook.IsWorldImpostorEnabled]] | *[[ScriptHook.IsWorldImpostorEnabled]] | ||
Line 51: | Line 75: | ||
*[[ScriptHook.SetLocalPlayerFreeCamera]] | *[[ScriptHook.SetLocalPlayerFreeCamera]] | ||
*[[ScriptHook.HasLocalPlayerFreeCamera]] | *[[ScriptHook.HasLocalPlayerFreeCamera]] | ||
+ | *[[ScriptHook.SetFreeCameraSpeeds]] | ||
+ | *[[ScriptHook.GetCameraLookAt]] | ||
+ | *[[ScriptHook.IsHudElementVisible]] | ||
+ | *[[ScriptHook.SetHudElementVisible]] | ||
+ | |||
+ | ===Felony=== | ||
+ | * [[ScriptHook.SetFelonySystemEnabled]], [[ScriptHook.IsFelonySystemEnabled]] | ||
+ | * [[ScriptHook.StartFelonySearch]] | ||
+ | * [[ScriptHook.SetFelonyHeatLevel]], [[ScriptHook.ClearFelonyHeatLevel]] | ||
+ | |||
+ | ===Environment=== | ||
+ | * [[ScriptHook.GetTimeShiftTargetTime]], [[ScriptHook.StartTimeShiftTransition]] | ||
+ | * [[ScriptHook.SetVehicleMaterialOverride]] | ||
==Utility== | ==Utility== |
Latest revision as of 19:05, 5 May 2021
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.
If you have used WD2 or MDE ScriptHook, check out the list of notable ScriptHook changes for Legion.
Contents
Generic
Script
UI
Game Functions
Player
- ScriptHook.Teleport
- ScriptHook.SetLocalPlayerNoclip
- ScriptHook.HasLocalPlayerNoclip
- ScriptHook.SetNoclipSpeeds
Entity
- ScriptHook.GetAllEntities
- ScriptHook.GetEntitiesInRange
- ScriptHook.GetEntitiesWithComponent
- ScriptHook.GetEntityComponents
- ScriptHook.EntityHasComponent
- ScriptHook.GetEntityClassName
- ScriptHook.SetEntityIsStatic
- ScriptHook.SetEntityIsPersistent
- ScriptHook.SetEntityPoolClearOnUnused
- ScriptHook.SetEntityIsPoolable
- ScriptHook.SetEntityPhysicsEnabled
- ScriptHook.SetEntityIsVisible
- ScriptHook.GetEntityAABB
- ScriptHook.GetEntityLocalAABB
- ScriptHook.HasEntityUserLocalBBox
- ScriptHook.RemoteEntity
- ScriptHook.IsEntityLoaded
- ScriptHook.IsEntityInitialized
- ScriptHook.IsEntityAddedToWorld
- ScriptHook.IsEntityMoving
- ScriptHook.IsEntityShuttingDown,
- ScriptHook.IsEntitySleeping
- ScriptHook.SetEntitySleep
- ScriptHook.SetEntityIsVisible
- ScriptHook.IsEntityVisible
Vehicle
Game
- ScriptHook.SetWorldSpawnerEnabled
- ScriptHook.IsWorldSpawnerEnabled
- ScriptHook.SetWorldImpostorEnabled
- ScriptHook.IsWorldImpostorEnabled
Camera
- ScriptHook.CameraSetCustom
- ScriptHook.CameraReset
- ScriptHook.SetLocalPlayerFreeCamera
- ScriptHook.HasLocalPlayerFreeCamera
- ScriptHook.SetFreeCameraSpeeds
- ScriptHook.GetCameraLookAt
- ScriptHook.IsHudElementVisible
- ScriptHook.SetHudElementVisible
Felony
- ScriptHook.SetFelonySystemEnabled, ScriptHook.IsFelonySystemEnabled
- ScriptHook.StartFelonySearch
- ScriptHook.SetFelonyHeatLevel, ScriptHook.ClearFelonyHeatLevel
Environment
- ScriptHook.GetTimeShiftTargetTime, ScriptHook.StartTimeShiftTransition
- ScriptHook.SetVehicleMaterialOverride