sm.cell.getInteractablesByTags

Returns a table of Interactables which contain all of the given tags for a cell coordinate.

Kind: Function

Environments: Game

Game

sm.cell.getInteractablesByTags( x, y, tags )

Open the full Game reference

Availability: Server only

~ can be used to exclude a specific tag. Example: { "FRUIT", "~BANANA" } finds interactables tagged with FRUIT but excludes interactables that are also tagged with BANANA.

Note: Can only be used in a server_onCellLoaded callback

Parameters:

Name Type Description
x integer The X-coordinate
y integer The Y-coordinate
tags table A table {string, ...} of tags to match with.

Returns:

Type Description
table A table {Interactable, ...} of found interactables with matching tags