C
ChaosX2
Guest
Hey Everyone!
I'm trying to program a merchant for my RPG game. I'm stuck on going about the basic menu options; Buy, Sell, Talk. What I'm trying to avoid is having to make each button be an object. The three menu options are displayed using the draw_sprite function. Each of the sprite names are stored in an array.
ex:
menu_option[0] = spr_buyIcon
menu_option[1] = spr_sellIcon
menu_option[2] = spr_talkIcon
Here's where I'm stuck. I'd like for which ever button is selected to run through the animation which is simply a scaled version to simulate a small up an down scale animation (to designate it as selected). What I tried to do was...
if selector value == 1 (for example)
menu_option[1].image_speed = 1;
But it didn't work. I think it's because I drew the sprite rather than create an object and assigned the sprite but am not 100% sure. Would anyone happen to know of a way to make the sprites stored within the array to play it's animation or do I have to resort to using objects?
I'm trying to program a merchant for my RPG game. I'm stuck on going about the basic menu options; Buy, Sell, Talk. What I'm trying to avoid is having to make each button be an object. The three menu options are displayed using the draw_sprite function. Each of the sprite names are stored in an array.
ex:
menu_option[0] = spr_buyIcon
menu_option[1] = spr_sellIcon
menu_option[2] = spr_talkIcon
Here's where I'm stuck. I'd like for which ever button is selected to run through the animation which is simply a scaled version to simulate a small up an down scale animation (to designate it as selected). What I tried to do was...
if selector value == 1 (for example)
menu_option[1].image_speed = 1;
But it didn't work. I think it's because I drew the sprite rather than create an object and assigned the sprite but am not 100% sure. Would anyone happen to know of a way to make the sprites stored within the array to play it's animation or do I have to resort to using objects?