As I said in my last post, I said I was experimenting with modding and importing external assets from the drive. To change the sprite’s texture, I have to use resource.set_texture()
and the dimensions have to be 2^N by 2^N, same as the current atlas dimensions.
This is fine and all and I can work with it, just the only problem is if I want to change the texture of one of the game object sprites.
Because the code is resource.set_texture(go.get("#sprite", "texture0"), buffer, headers)
, it changes the shared texture all the sprites use.
I’ve thought of 2 ways to solve the problem but don’t know how to do them or if they would work.
-
Set the texture to a full picture of all the pictures and animations the sprite will use.
-
Have different textures generated when object is created and destroyed when deleted.
If there’s a way I can do one of these or if there is another solution, please tell me, thanks.