Tile source and box

Texture (box and pie nodes)

The texture to draw on the node. This is a reference to an image or animation in an atlas or tile source.

Is it possible to dynamically superimpose a tile by number on a box

Or is it not possible?

Or somehow take a part of the texture at the specified coordinates and size

If you want to use a tile from tilesource on a box node you need to first create an animation with that single tile and then assign that animation to the box node.


Im make simple game and i use box node perficly

local item = gui.new_box_node(vmath.vector3(0, 0, 0), item_size)
gui.set_pivot(item, gui.PIVOT_NW)

	--gui.set_texture(item, "anim_1")

	--gui.play_flipbook(item, "anim_1")

How i set this anim_1 animation to this item node?

Or is it possible only for one texture? I just want to use one large image and take parts of it by coordinates

gui.set_texture(item, texture_alias)  -- what _is_ the texture alias in your gui scene?
gui.play_flipbook(item, "anim_1")

Yes, you’re on the right track. Set the texture first, with the alias of the texture (as seen in the .gui file)

2 Likes