D
daprato
Guest
Hi GM people, having lot of fun, but I'm stucked here. I'm trying to join 2 string from 2 variable to make one variable that will represent a sprite name.
Let say that I have 5 sprites:
spr_icon
spr_car_1
spr_car_2
spr_car_3
spr_car_4
I have a scale that vary, used for other things
myscale = 1;
Now I want to draw tiled sprite base on this scale. So I thought about converting variables to string to combine them making my real sprite name
name1 = "spr_car_";
name2 = string(myscale);
mysprite=name1+name2
draw_sprite_tiled(mysprite, 0, x, y)
no matter how I want to pack my strings, it renders always my first sprite on my project : spr_icon
Thx
Let say that I have 5 sprites:
spr_icon
spr_car_1
spr_car_2
spr_car_3
spr_car_4
I have a scale that vary, used for other things
myscale = 1;
Now I want to draw tiled sprite base on this scale. So I thought about converting variables to string to combine them making my real sprite name
name1 = "spr_car_";
name2 = string(myscale);
mysprite=name1+name2
draw_sprite_tiled(mysprite, 0, x, y)
no matter how I want to pack my strings, it renders always my first sprite on my project : spr_icon
Thx