🎮Input
Table to work with input system.
GetWorldCursorPos(): Vector
Vector
Returns world cursor position.
GetCursorPos(): number
, number
number
, number
Returns screen cursor position (x, y). See example.
Example
IsCursorInRect(x: number
, y: number
, w: number
, h: number
): boolean
number
, y: number
, w: number
, h: number
): boolean
Name
Type
Description
x
number
x position
y
number
w
number
width
h
number
height
Returns true
if cursor is in rect.
IsCursorInBounds(x0: number
, y0: number
, x1: number
, y1: number
): boolean
number
, y0: number
, x1: number
, y1: number
): boolean
Name
Type
Description
x0
number
y0
number
x1
number
y1
number
Returns true
if cursor is in bounds.
Excludes not visible, illusions and dead units.
Name
Type
Description
Returns nearest unit to cursor.
Excludes not visible, illusions and dead heroes.
Name
Type
Description
Returns nearest hero to cursor.
IsInputCaptured(): boolean
boolean
Returns true
if input is captured. e.g. opened console, chat, shop.
IsKeyDown(KeyCode: Enum.ButtonCode
): boolean
Enum.ButtonCode
): boolean
Name
Type
Description
Returns true
if key is down.
IsKeyDownOnce(KeyCode: Enum.ButtonCode
): boolean
Enum.ButtonCode
): boolean
This function will return `true` only once per key press.
Name
Type
Description
Return true
if key is down once.
Last updated