Input
Table to work with input system.
GetWorldCursorPos(): Vector
Vector
Returns world cursor position.
GetCursorPos(): 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
): ``
number
, y0: number
, x1: number
, y1: number
): ``Name
Type
Description
x0
number
y0
number
x1
number
y1
number
Returns true
if cursor is in bounds.
GetNearestUnitToCursor(teamNum: Enum.TeamNum
, teamType: Enum.TeamType
): NPC | nil
Enum.TeamNum
, teamType: Enum.TeamType
): NPC | nil
Name
Type
Description
teamNum
Enum.TeamNum
team number. Could be get from Entity.GetTeamNum
teamType
Enum.TeamType
team type to search relative to teamNum param
Returns nearest unit to cursor.
GetNearestHeroToCursor(teamNum: Enum.TeamNum
, teamType: Enum.TeamType
): Hero | nil
Enum.TeamNum
, teamType: Enum.TeamType
): Hero | nil
Name
Type
Description
teamNum
Enum.TeamNum
team number. Could be get from Entity.GetTeamNum
teamType
Enum.TeamType
team type to search relative to teamNum param
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
KeyCode
Enum.ButtonCode
Returns true
if key is down.
IsKeyDownOnce(KeyCode: Enum.ButtonCode
): boolean
Enum.ButtonCode
): boolean
Name
Type
Description
KeyCode
Enum.ButtonCode
Return true
if key is down once.
Last updated