I’m currently trying to make a custom level editor for my game, however when making the buttons, I run into issues in how they handle the use of tlesource sprites.
The way I have implemented it, the program gets the ID of the block, and then when the new palatte tile is created, it gets the tilesource animation (which is every tile in the tilesource as an Non-playing 0fps animation) and runs gui.play_flipbook(newNode, "Tiles", nil, {ID,0})
which is designed to use the cursor to curate the current displayed image dictated by the id
Now the nodes seems to be ignoring the cursor placement entirely, even if I set ID to a static 3, it only plays the first tile in the animation.
I’ve tried shifting the fps and playback types, but nothing works, except for it playing straight, which still doesn’t asyncopate the cursor for each object
Now-
-Why is the cursor in gui.play_flipbook not working?
-is the sprite component in a cloned object with no children shared with other clones?
-is there a way to set the id of a tilesource as a gui image which isn’t this message?
Providing my whole function for context
local function CreatePallate(DebugNodes) --this is just the gui.get_nodes list for the level editor
local Buffer = 0
for i = 0, GroundTiles.GetGroundTypesCount(),1 do
if GroundTiles.GetTileData(i) ~= nil and GroundTiles.GetTileData(i).EDITOR_BLACK_LIST == false then
local newNode = gui.clone(DebugNodes.PALATTE_TO_COPY)
gui.set_id(newNode, "PalatteTile".. i)
gui.set_position(newNode,vmath.vector3(65 + (Buffer * 50),640,0))
Buffer = Buffer + 1
gui.play_flipbook(newNode, "Tiles", nil, {i,1}) --The line that doesn't work
table.insert(DisplayedPallate,table.maxn(DisplayedPallate),newNode)
end
end
end