Skip to main content
Version: bleeding-edge 🩸

⌨️ Client

Static Class present on Client side.

πŸ’‚Authority
This static class can be accessed only on 🟧 Client.
πŸ—ΏStatic Class
This is a Static Class. You can access it's methods directly with .. It is not possible to initialize or create new instances.

πŸ—Ώ Static Functions​

ReturnsNameDescription
CallLevelBlueprintEventCalls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine)
DrawDebugBox
DrawDebugCoordinateSystem
DrawDebugCrosshairs
DrawDebugCylinder
DrawDebugDirectionalArrow
DrawDebugLineDraws a Debug Line in the World
DrawDebugPointDraws a Debug Point in the World
DrawDebugSphereDraws a Debug Line in the World
DrawDebugString
Vector2D ProjectWorldToScreenTransforms a 3D world-space vector into 2D screen coordinates
table DeprojectScreenToWorldTransforms a 2D screen coordinates into 3D world-space location
InitializeDiscordInitializes the Discord Integration with your custom client_id
SendChatMessageSends a chat message which will display local only
SetChatConfigurationConfigure the Chat
SetChatVisibilitySet if the Chat is visible or not
SetCrosshairEnabledEnables/Disables the Blood Screen effect
SetBloodScreenEnabledEnables/Disables the Blood Screen effect
SetBloodScreenIntensityManually sets the Blood Screen intensity
SetHardwareCursorLoads or sets a hardware cursor from the content directory in the game
SetDiscordActivityCommunicates with Discord and sets a custom user status
SetInputEnabledToggles Local Player input
SetMouseEnabledDisplays/Hides Mouse Cursor
SetMousePositionSets the mouse position
SetHighlightColorChanges the Highlight Color for highlighted actors at a specific Index
SetOutlineColorChanges the Outline Color for outlined actors at a specific Index
SetSteamRichPresenceSets Steam Rich Presence value
SetValueSets a global value in the Client, which can be accessed from anywhere (client side)
function SubscribeSubscribes for an Event
UnsubscribeUnsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
table TraceLineSingleTrace a ray against the world and returns a table with the first blocking hit information
table of table TraceLineMultiTrace a ray against the world using object types and return overlapping hits and then first blocking hit
Player GetLocalPlayerGets the local Player
Vector GetRandomReachablePointInRadiusFinds random, reachable point in navigable space restricted to radius around origin
Vector GetRandomPointInNavigableRadiusFinds random, point in navigable space restricted to Radius around Origin. Resulting location is not tested for reachability from the Origin
table FindPathToLocationFinds a Path given Start and End location
number GetTimeGets the Unix Epoch Time in milliseconds
string GetMapReturns the current Map
Vector2D GetMousePositionGets the current mouse screen location
table of string GetPackagesReturns a list of Packages folder names loaded and running in the client
Vector2D GetViewportSizeGets the size of viewport
any or nilGetValueGets a value given a key
InputKeyForces an Input Key event on Local Player
boolean IsKeyDownReturns if a key is being pressed
boolean IsMouseEnabled
boolean IsInputEnabled

CallLevelBlueprintEvent​

Calls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine)
Client.CallLevelBlueprintEvent(event_name)
TypeParameterDefaultDescription
string event_name

DrawDebugBox​

Client.DrawDebugBox(location, extent, rotation, color, life_time, thickness)
TypeParameterDefaultDescription
Vector location
Vector extent
Rotator rotation
Color color
number life_time
number thickness

DrawDebugCoordinateSystem​

Client.DrawDebugCoordinateSystem(location, rotation, size, life_time, thickness)
TypeParameterDefaultDescription
Vector location
Rotator rotation
number size
number life_time
number thickness

DrawDebugCrosshairs​

Client.DrawDebugCrosshairs(location, rotation, size?, color?, life_time, thickness)
TypeParameterDefaultDescription
Vector location
Rotator rotation
number size?100
Color color?Color.RED
number life_time
number thickness

DrawDebugCylinder​

Client.DrawDebugCylinder(start_location, end_location, radius, segments, color?, life_time, thickness)
TypeParameterDefaultDescription
Vector start_location
Vector end_location
number radius
number segments
Color color?Color.RED
number life_time
number thickness

DrawDebugDirectionalArrow​

Client.DrawDebugDirectionalArrow(start_location, end_location, arrow_size?, color?, life_time, thickness)
TypeParameterDefaultDescription
Vector start_location
Vector end_location
number arrow_size?100
Color color?Color.RED
number life_time
number thickness

DrawDebugLine​

Draws a Debug Line in the World
Client.DrawDebugLine(start_position, end_position, color?, life_time, thickness)
TypeParameterDefaultDescription
Vector start_position
Vector end_position
Color color?Color.RED
number life_time
number thickness

DrawDebugPoint​

Draws a Debug Point in the World
Client.DrawDebugPoint(start_position, color?, life_time, size)
TypeParameterDefaultDescription
Vector start_position
Color color?Color.RED
number life_time
number size

DrawDebugSphere​

Draws a Debug Line in the World
Client.DrawDebugSphere(start_location, radius, segments, color?, life_time, thickness)
TypeParameterDefaultDescription
Vector start_location
number radius
number segments
Color color?Color.RED
number life_time
number thickness

DrawDebugString​

Client.DrawDebugString(location, text, color?, life_time, draw_shadow, font_scale)
TypeParameterDefaultDescription
Vector location
string text
Color color?Color.RED
number life_time
boolean draw_shadow
number font_scale

ProjectWorldToScreen​

Transforms a 3D world-space vector into 2D screen coordinates

Returns Vector2D ()
local ret = Client.ProjectWorldToScreen(world_position)
TypeParameterDefaultDescription
Vector world_positionWorld 3D position

DeprojectScreenToWorld​

Transforms a 2D screen coordinates into 3D world-space location

Returns table (in the format { Position: Vector, Direction: Vector })
local ret = Client.DeprojectScreenToWorld(screen_position)
TypeParameterDefaultDescription
Vector2D screen_positionScreen position

InitializeDiscord​

Initializes the Discord Integration with your custom client_id
Client.InitializeDiscord(client_id)
TypeParameterDefaultDescription
number client_id

SendChatMessage​

Sends a chat message which will display local only
Client.SendChatMessage(message)
TypeParameterDefaultDescription
string message

SetChatConfiguration​

Configure the Chat
Client.SetChatConfiguration(screen_location?, size?, anchors_min?, anchors_max?, alignment?, justify?, show_scrollbar?)
TypeParameterDefaultDescription
Vector2D screen_location?Vector(-25, 0)
Vector2D size?Vector(600, 250)
Vector2D anchors_min?Vector(1, 0.5)
Vector2D anchors_max?Vector(1, 0.5)
Vector2D alignment?Vector(1, 0.5)
boolean justify?true
boolean show_scrollbar?true

SetChatVisibility​

Set if the Chat is visible or not
Client.SetChatVisibility(is_visible)
TypeParameterDefaultDescription
boolean is_visible

SetCrosshairEnabled​

Enables/Disables the Blood Screen effect
Client.SetCrosshairEnabled(is_enabled)
TypeParameterDefaultDescription
boolean is_enabled

SetBloodScreenEnabled​

Enables/Disables the Blood Screen effect
Client.SetBloodScreenEnabled(is_enabled)
TypeParameterDefaultDescription
boolean is_enabled

SetBloodScreenIntensity​

If you want the Blood Screen to do not be overridden, disable it with Client.SetBloodScreenEnabled(false) before
Client.SetBloodScreenIntensity(intensity)
TypeParameterDefaultDescription
number intensityFrom 0.0 to 1.0

SetHardwareCursor​

Loads or sets a hardware cursor from the content directory in the game
Client.SetHardwareCursor(cursor_shape, cursor_path, hotspot?)
TypeParameterDefaultDescription
CursorTypecursor_shape
string cursor_path
Vector2D hotspot?Vector(0, 0)

SetDiscordActivity​

Communicates with Discord and sets a custom user status
Client.SetDiscordActivity(state, details, large_image, large_text, reset_time?)
TypeParameterDefaultDescription
string state
string details
string large_image
string large_text
string reset_time?falseWhether or not to reset current activity elapsed time

SetInputEnabled​

Toggles Local Player input
Client.SetInputEnabled(enable_input)
TypeParameterDefaultDescription
boolean enable_input

SetMouseEnabled​

Displays/Hides Mouse Cursor
Client.SetMouseEnabled(is_enabled)
TypeParameterDefaultDescription
boolean is_enabled

SetMousePosition​

Sets the mouse position
Client.SetMousePosition(new_position)
TypeParameterDefaultDescription
Vector2D new_position

SetHighlightColor​

Changes the Highlight Color for highlighted actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.

HighlightMode.Always will always be visible, even behind walls
HighlightMode.OnlyHidden will only be visible if behind a wall
HighlightMode.OnlyVisible will only be visible if not behind a wall

Note: You can only have 3 differents indexes (0, 1 or 2).
Client.SetHighlightColor(highlight_color, index, mode?)
TypeParameterDefaultDescription
Color highlight_color
number index
HighlightModemode?HighlightMode.Always

SetOutlineColor​

Changes the Outline Color for outlined actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.

Note: You can only have 3 differents indexes (0, 1 or 2), and the default Outline color index used by the game is 0 (when interacting with stuff).
Client.SetOutlineColor(outline_color, index?, thickness?)
TypeParameterDefaultDescription
Color outline_color
number index?0
number thickness?2

SetSteamRichPresence​

Sets Steam Rich Presence value
Client.SetSteamRichPresence(text)
TypeParameterDefaultDescription
string text

SetValue​

Sets a global value in the Client, which can be accessed from anywhere (client side)

Please refer to Entity Values for more information
Client.SetValue(key, value)
TypeParameterDefaultDescription
string key
any value

Subscribe​

Subscribes for an Event

Returns function (the function callback itself)
local ret = Client.Subscribe(event_name, callback)
TypeParameterDefaultDescription
string event_name
function callback

Unsubscribe​

Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
Client.Unsubscribe(event_name, callback?)
TypeParameterDefaultDescription
string event_name
function callback?nil

TraceLineSingle​

Trace a ray against the world and returns a table with the first blocking hit information

Note: The Trace will collide with the ObjectType (in the Collision Settings), even if the channel is ignored below.


Returns table (in the format { Success: boolean, Location: Vector, Normal: Vector, Entity: Actor, BoneName: string, ActorName: string, ComponentName: string, SurfaceType: SurfaceType, UV: Vector2D })
local ret = Client.TraceLineSingle(start_location, end_location, collision_channel?, trace_mode?, ignored_actors?)
TypeParameterDefaultDescription
Vector start_locationStart location of the ray
Vector end_locationEnd location of the ray
CollisionChannelcollision_channel?WorldStaticSupports several channels separating by | (using bit-wise operations)
TraceModetrace_mode?0Trace Mode, pass all parameters separating by | (using bit-wise operations)

You need to explicitily pass the modes to return the values you want
table of Base Actor ignored_actors?{}Array of actors to ignore during the trace

TraceLineMulti​

Trace a ray against the world using object types and return overlapping hits and then first blocking hit

Note: The Trace will collide with the ObjectType (in the Collision Settings), even if the channel is ignored below.

Results are sorted, so a blocking hit (if found) will be the last element of the array

Only the single closest blocking result will be generated, no tests will be done after that


Returns table of table (in the format { Success: boolean, Location: Vector, Normal: Vector, Entity: Actor, BoneName: string, ActorName: string, ComponentName: string, SurfaceType: SurfaceType, UV: Vector2D })
local ret = Client.TraceLineMulti(start_location, end_location, collision_channel?, trace_mode?, ignored_actors?)
TypeParameterDefaultDescription
Vector start_locationStart location of the ray
Vector end_locationEnd location of the ray
CollisionChannelcollision_channel?WorldStaticSupports several channels separating by | (using bit-wise operations)
TraceModetrace_mode?0Trace Mode, pass all parameters separating by | (using bit-wise operations)

You need to explicitily pass the modes to return the values you want
table of Base Actor ignored_actors?{}Array of actors to ignore during the trace

GetLocalPlayer​

Gets the local Player

Returns Player (The local Player)
local ret = Client.GetLocalPlayer()

GetRandomReachablePointInRadius​

Finds random, reachable point in navigable space restricted to radius around origin (only if map has a NavMesh)

Returns Vector (The random point)
local ret = Client.GetRandomReachablePointInRadius(origin, radius)
TypeParameterDefaultDescription
Vector origin
number radius

GetRandomPointInNavigableRadius​

Finds random, point in navigable space restricted to Radius around Origin. Resulting location is not tested for reachability from the Origin (only if map has a NavMesh)

Returns Vector (The random point)
local ret = Client.GetRandomPointInNavigableRadius(origin, radius)
TypeParameterDefaultDescription
Vector origin
number radius

FindPathToLocation​

Finds a Path given Start and End location (only if map has a NavMesh)

Returns table (in the format { IsValid: boolean, IsPartial: boolean, Length: number, Cost: number, PathPoints: Vector[] })
local ret = Client.FindPathToLocation(start_location, end_location)
TypeParameterDefaultDescription
Vector start_location
Vector end_location

GetTime​

Gets the Unix Epoch Time in milliseconds

Returns number (the unix timestamp)
local ret = Client.GetTime()

GetMap​

Returns the current Map

Returns string (The current Map)
local ret = Client.GetMap()

GetMousePosition​

Gets the current mouse screen location

Returns Vector2D (The current mouse screen location)
local ret = Client.GetMousePosition()

GetPackages​

Returns a list of Packages folder names loaded and running in the client

Returns table of string (packages folder names)
local ret = Client.GetPackages()

GetViewportSize​

Gets the size of viewport

Returns Vector2D (The size of viewport)
local ret = Client.GetViewportSize()

GetValue​

Gets a value given a key

Returns any or nil (the value)
local ret = Client.GetValue(key, fallback)
TypeParameterDefaultDescription
string key
any fallback

InputKey​

Forces an Input Key event on Local Player

This won't trigger any Scripting event as it bypass internal validations
Client.InputKey(key_name, input_event, amount_depressed?)
TypeParameterDefaultDescription
string key_nameKey Name to input
InputEventinput_eventWhich Event to input
number amount_depressed?1The amount pressed

IsKeyDown​

Returns if a key is being pressed

Returns boolean (if the key is pressed)
local ret = Client.IsKeyDown(key_name)
TypeParameterDefaultDescription
string key_name

IsMouseEnabled​



Returns boolean (if the mouse is visible)
local ret = Client.IsMouseEnabled()

IsInputEnabled​



Returns boolean (if the input is visible)
local ret = Client.IsInputEnabled()

πŸš€ Events​

NameDescription
ChatCalled when a chat text is submitted (by LocalPlayer)
ChatEntryCalled when a Chat Entry is received, this is also triggered when SendChatMessage is called
ConsoleCalled when a console command is submitted
KeyDownA keyboard key is being pressed
KeyPressA keyboard key has been pressed
KeyUpA keyboard key has been released
LogEntryCalled when a Client log is received
MouseDownA mouse button has been pressed / is being pressed
MouseUpA mouse button has been released
MouseEnabledWhen mouse cursor is displayed/hidden
MouseMoveXCalled when the mouse moves in the X axis
MouseMoveYCalled when the mouse moves in the Y axis
MouseScrollCalled when the mouse scrolls
OpenChatWhen player opens the Chat
CloseChatWhen player closes the Chat
OpenConsoleWhen player closes the Console
CloseConsoleWhen player closes the Console
TickCalled Every Frame. Do not abuse
SpawnLocalPlayerCalled when the local player spawns (just after the game has loaded)
ViewportResizedCalled when the screen is resized
WindowFocusChangedCalled when the game is focused/unfocused

Chat​

Called when a chat text is submitted (by LocalPlayer)

Return false to do not send the message
Client.Subscribe("Chat", function(text, player)

end)
TypeArgumentDescription
string textThe message send by the player
Player playerThe player who send the message

ChatEntry​

Called when a Chat Entry is received, this is also triggered when SendChatMessage is called

This is also triggered when SendChatMessage is called (useful for creating your own Chat interface while still use the built-in system)
Client.Subscribe("ChatEntry", function(text, player)

end)
TypeArgumentDescription
string textThe message send by the player
Player playerThe player who send the message

Console​

Called when a console command is submitted
Client.Subscribe("Console", function(text)

end)
TypeArgumentDescription
string text

KeyDown​

A keyboard key is being pressed

Return false to block it
Client.Subscribe("KeyDown", function(key_name)

end)
TypeArgumentDescription
string key_nameThe message send by the player

KeyPress​

A keyboard key has been pressed

Return false to block it
Client.Subscribe("KeyPress", function(key_name)

end)
TypeArgumentDescription
string key_name

KeyUp​

A keyboard key has been released

Return false to block it
Client.Subscribe("KeyUp", function(key_name)

end)
TypeArgumentDescription
string key_name

LogEntry​

Called when a Client log is received
Client.Subscribe("LogEntry", function(text, type)

end)
TypeArgumentDescription
string text
LogTypetype

MouseDown​

A mouse button has been pressed / is being pressed

Return false to block it
Client.Subscribe("MouseDown", function(key_name, mouse_x, mouse_y)

end)
TypeArgumentDescription
string key_name
number mouse_x
number mouse_y

MouseUp​

A mouse button has been released

Return false to block it
Client.Subscribe("MouseUp", function(key_name, mouse_x, mouse_y)

end)
TypeArgumentDescription
string key_name
number mouse_x
number mouse_y

MouseEnabled​

When mouse cursor is displayed/hidden
Client.Subscribe("MouseEnabled", function(is_enabled)

end)
TypeArgumentDescription
boolean is_enabled

MouseMoveX​

Called when the mouse moves in the X axis
Client.Subscribe("MouseMoveX", function(delta, delta_time, num_samples)

end)
TypeArgumentDescription
number delta
number delta_time
number num_samples

MouseMoveY​

Called when the mouse moves in the Y axis
Client.Subscribe("MouseMoveY", function(delta, delta_time, num_samples)

end)
TypeArgumentDescription
number delta
number delta_time
number num_samples

MouseScroll​

Called when the mouse scrolls
Client.Subscribe("MouseScroll", function(delta, mouse_x, mouse_y)

end)
TypeArgumentDescription
number delta
number mouse_x
number mouse_y

OpenChat​

When player opens the Chat
Client.Subscribe("OpenChat", function()

end)

CloseChat​

When player closes the Chat
Client.Subscribe("CloseChat", function()

end)

OpenConsole​

When player closes the Console
Client.Subscribe("OpenConsole", function()

end)

CloseConsole​

When player closes the Console
Client.Subscribe("CloseConsole", function()

end)

Tick​

Called Every Frame. Do not abuse
Client.Subscribe("Tick", function(delta_time)

end)
TypeArgumentDescription
number delta_time

SpawnLocalPlayer​

Called when the local player spawns (just after the game has loaded)
Client.Subscribe("SpawnLocalPlayer", function(local_player)

end)
TypeArgumentDescription
Player local_player

ViewportResized​

Called when the screen is resized
Client.Subscribe("ViewportResized", function(new_size)

end)
TypeArgumentDescription
Vector2D new_sizeNew new screen size

WindowFocusChanged​

Called when the game is focused/unfocused
Client.Subscribe("WindowFocusChanged", function(is_focused)

end)
TypeArgumentDescription
boolean is_focusedIf it's focused

⌨️ Key Names​

List of all keys names returned in Key/Mouse events.

▢️ Function Keys​

Key NameDescription
F1Function one
F2Function two
F3Function three
F4Function four
F5Function five
F6Function six
F7Function seven
F8Function eight
F9Function nine
F10Function ten
F11Function eleven
F12Function twelve

▢️ Alphanumerical keys​

Key NameDescription
ALetter A
BLetter B
CLetter C
DLetter D
ELetter E
FLetter F
GLetter G
HLetter H
ILetter I
JLetter J
KLetter K
LLetter L
MLetter M
NLetter N
OLetter O
PLetter P
QLetter Q
RLetter R
SLetter S
TLetter T
ULetter U
VLetter V
WLetter W
XLetter X
YLetter Y
ZLetter Z

▢️ Special keys​

Key NameDescription
EscapeEscape
TabTab
Tilde~
ScrollLockScroll lock
PausePause
OneOne
TwoTwo
ThreeThree
FourFour
FiveFive
SixSix
SevenSeven
EightEight
NineNine
ZeroZero
Underscore_
Equals=
Backslash
LeftBracket[
RightBracket]
EnterEnter or Numpad enter
CapsLockCaps lock
Semicolon;
Quoteβ€˜
LeftShiftLeft shift
Comma,
Period.
Slash/
RightShiftRight Shif
LeftControlLeft control
LeftAltLeft alt
SpaceBarSpace bar
RightAltRight alt
RightControlRight control
LeftLeft
UpUp
DownDown
RightRight
HomeHome
EndEnd
InsertInsert
PageUpPage up
DeleteDelete
PageDownPage down
NumLockNum lock
DivideNumpad /
MultiplyNumpad *
SubtractNumpad -
AddNumpad +
PageDownPage down
NumPadOneNumpad one
NumPadTwoNumpad two
NumPadThreeNumpad three
NumPadFourNumpad four
NumPadFiveNumpad five
NumPadSixNumpad six
NumPadSevenNumpad seven
NumPadEightNumpad eight
NumPadNineNumpad nine
NumPadZeroNumpad zero
DecimalNumpad decimal

▢️ Mouse​

Key NameDescription
LeftMouseButtonLeft mouse button
RightMouseButtonRight mouse button
ThumbMouseButtonPrimary mouse thumb button
ThumbMouseButton2Secondary mouse thumb button
MouseScrollUpMouse wheel scrolling up
MouseScrollDownMouse wheel scrolling down
MouseXMouse movement on the X axis
MouseYMouse movement on the Y axis