U
utku
Guest
I have an event that creates and places objects on a layer via;
instance_create_layer( <relevant x value>,<relevant y value>,"layer_block",obj_idleblock)
Those obj_idleblock objects has a square sprite, and a draw event that draws a text inside displaying the value from a global variable at that moment.
idleblock_value = global.block_value;
draw_self();
draw_text(x,y,string(idleblock_value));
My problem is that every time that global value changes, the text value displayed on all previous ones change to the newest value. So instead of having a pile of blocks that each display the value of the time they were created; I end up with a screen full of blocks that all display the same value, which keeps changing every time the value is updated.
I am sure there is a simple solution to this, but I couldn't find anything with search so far, so any help would be greatly appreciated.
instance_create_layer( <relevant x value>,<relevant y value>,"layer_block",obj_idleblock)
Those obj_idleblock objects has a square sprite, and a draw event that draws a text inside displaying the value from a global variable at that moment.
idleblock_value = global.block_value;
draw_self();
draw_text(x,y,string(idleblock_value));
My problem is that every time that global value changes, the text value displayed on all previous ones change to the newest value. So instead of having a pile of blocks that each display the value of the time they were created; I end up with a screen full of blocks that all display the same value, which keeps changing every time the value is updated.
I am sure there is a simple solution to this, but I couldn't find anything with search so far, so any help would be greatly appreciated.