Function

get

(tag: Tag | Tag[], opts?: GetOpt): GameObj[]

Get a list of all game objs with certain tag.

param tag- The tag to search for. Use "*" to get all objects.

param opts- Additional options.

// get a list of all game objs with tag "bomb"
const allBombs = get("bomb");

// To get all objects use "*"
const allObjs = get("*");

// Recursively get all children and descendents
const allObjs = get("*", { recursive: true });

returns A list of game objects that have the tag.

since v2000.0

group Game Obj

kaplay logo

Layer

Miscalenous