Trandoxiana
Member
So, I have a scrolling asset layer that I use as a background (on top of a solid color background layer). It's just some rotated squares that I manually placed in the room editor. They are currently a light blue, but I want to be able to change that color when in another room. I am not sure this is the right way to go about this, but what I've been trying to do is use layer functions to change their color based on what room it is in. (I would be doing this through a persistent controller object.) I first tried this:
and then this:
But neither worked. (For the second one I added another frame to the sprite.) It did not seem that either had any effect on the sprites. I know the reason this is so difficult is because it is an asset layer and they are not objects that I can just put code into, but I had made it this way to conserve resources. Should I just make them all objects? Should I not worry about performance issues? I don't have any currently, but I am conscious of creating an excessive amount of objects. Or is there another solution that I am missing?
P.S. This is my first post here, so sorry if I messed something up
GML:
var lay_id = layer_get_id("Squares");
var spr_id = layer_sprite_get_id(lay_id, "spr_diamond_backround");
layer_sprite_blend(spr_id, c_red);
GML:
var lay_id = layer_get_id("Squares");
var spr_id = layer_sprite_get_id(lay_id, "spr_diamond_backround");
layer_sprite_index(spr_id, 1);
P.S. This is my first post here, so sorry if I messed something up