Pointer¶
The Pointer
library contains methods related to the pointer for the game world; used to interact with game objects and move around.
It's primarily a wrapper around Ext.UI.GetPickingState()
. In addition to methods to quickly fetch its entities, it offers events for when they change (when the user starts/stops hovering over a new entity).
PointerLib Class¶
Inherits from Library
.
Events and Hooks¶
HoverCharacterChanged (event)¶
@field Character EclCharacter?
HoverCharacter2Changed (event)¶
Fired when the corpse character over the pointer changes.
@field Character EclCharacter?
HoverItemChanged (event)¶
@field Item EclItem?
HoverEntityChanged (event)¶
@field Entity Entity?
DragDropStateChanged (event)¶
Fired when a player starts or ends a drag drop.
@field State DragDropManagerPlayerDragInfo?
`nil` if the player stopped dragging.
@field PlayerIndex integer
UIDragStarted (event)¶
@field UI UIObject
UIDragEnded (event)¶
@field UI UIObject
Methods¶
GetCurrentCharacter¶
@param playerIndex integer?
Defaults to 1.
@param includeDead boolean?
Defaults to false.
GetCurrentEntity¶
@param playerIndex integer?
Defaults to 1.
GetCurrentItem¶
@param playerIndex integer?
Defaults to 1.
GetDragDropState¶
Returns the drag-drop system state for a player.
@param playerIndex integer?
Defaults to 1.
GetDraggedItem¶
Returns the item being dragged by a player.
@param playerIndex integer?
Defaults to 1.
GetDraggedSkill¶
function PointerLib.GetDraggedSkill(playerIndex) -- (Client-only)
-> string? -- Can be an action as well.
Returns the skill being dragged by a player.
@param playerIndex integer?
Defaults to 1.
GetWalkablePosition¶
@param playerIndex integer?
Defaults to 1.
GetWorldPosition¶
@param playerIndex integer?
Defaults to 1.
IsDragging¶
Returns whether the player's cursor is dragging anything.
@param playerIndex integer?
Defaults to 1.
StopDragging¶
Stops a drag-drop.
@param playerIndex integer?
Defaults to `1`.