Skip to content

sprite_id

Return the id of a named sprite, or nil when the name is unknown.

Parameters

  • atlas — An atlas.
  • name — A sprite name.
local id = sprite_id(atlas, "ship")

Related: sprite_info.

See the images guide for more examples and limits.