Could you store the tint somewhere in self and then use it later? Or probably you already have it there if you passed the tint as a property at factory creation time?
-- recommended instead of sprite.set_constant() as it is a deprecated function
go.set("#sprite", "tint", vmath.vector4(1,1,0,1))
-- read it next frame
print(go.get("#sprite", "tint"))
But for some reason go.get() will give me the original value. I don’t recall why that is. @JCash probably knows!
If I spawn a sprite from factory, use go.set(sprite, “tint”, col)
and destroy it each frame, the memory used by defold keeps increasing. It only happens with tint, so I think that may be related to getting the unexpected value back.
If you do it enough you can see it’s a memory leak still. I made an issue on github for it.