Pfap
Member
So I set up my game pretty much using all the built in variables.
I want to change which sprite is drawn, but I don't want to change sprite_index because I use the value of sprite_index for my games logic.
I thought a work around would be to just draw the sprite change I need, but then when I change image_speed it is not affecting the sprite being drawn.
Any ideas on how to fix this without going through and changing how I use the sprite_index variable in my logic?
EDIT:
I just tried it with image_speed = 5 and it works, but anything lower than image_speed = 3 nd it just sits there. Any ideas why?
I want to change which sprite is drawn, but I don't want to change sprite_index because I use the value of sprite_index for my games logic.
I thought a work around would be to just draw the sprite change I need, but then when I change image_speed it is not affecting the sprite being drawn.
Code:
//create event
sprite_index = my_sprite;
sprite_control = sprite_index;
image_index = 0;
image_speed = 0;
Code:
//draw event
//essentially being used as draw_self()
draw_sprite(sprite_control, image_index, x, y);
Code:
//tap event
//this changes the sprite but not the sprite's image_speed
sprite_control = my_other_sprite;
image_speed = 5;
Any ideas on how to fix this without going through and changing how I use the sprite_index variable in my logic?
EDIT:
I just tried it with image_speed = 5 and it works, but anything lower than image_speed = 3 nd it just sits there. Any ideas why?