I’m making progress but stumbled on a different issue as I try to just get a hackable prototype going. I’m trying to load two images from disk and set each to a new texture and populate their corresponding gui.node box.
filename = "scroll-room-examp"
filename = "/main/bundled_resources/common/scene-backgrounds/"..filename..".png"
local data, error = sys.load_resource(filename)
if not data then
local png = image.load(data)
gui.new_texture("placeimage", png.width, png.height, "rgb", png.buffer)
filename = "women"
filename = "/main/bundled_resources/common/scene-objects/"..filename..".png"
local data2, error = sys.load_resource(filename)
if not data2 then
newpng = image.load(data2)
gui.new_texture("objecttoload", newpng.width, newpng.height, "rgb", newpng.buffer)
But on the last line it’s triggering
Texture ‘objecttoload’ is not specified in scene
I renamed some of the variables on the second block of loading code just to see if there was some issue there… I’m sure this isn’t the way to load multiple objects from disk to display in-game but again I’m just trying to get a quick and dirty version of this idea up and running first.
Going to look back at some older code that didn’t have this problem in meantime.