at first I though it was a game like this:
memory_sequence_GM70.gmkbut after looking at the url it seems to be more like a:
button_match_engine_GM80.gmkbasicly what I did here was to make a list:
tot=3; // 3 items in the list
list[0]=0 // where the last number is a direction, 0 left, 1 up, 2 rigth, 3 down
list[1]=2
list[2]=3
cur=0; // and this is what position in the list we are in, since
we find the key we need to type in by list[cur] .. and since cur is 0 atm, so is the first key at list[0] which is 0 .. left
now ..
vk_left, vk_up, vk_right, vk_down are actually the numbers 37 38 39 40 .. so if I take away 37 from each of them, then I get the numbers we use for each direction, 0 1 2 3..
so to detect a keypress:
if keyboard_check_pressed(vk_left)
if list[cur]=0 // if it is the correct direction for that position in the list
cur+=1 // then move to the next key in the list
if keyboard_check_pressed(vk_up)
if list[cur]=1
cur+=1and the same for the rest of the buttons
for(i=0;i<tot;i+=1)
if cur>i // if we have typed in this one
draw_sprite(spr_button2, list[i] , x+i*32, y) // then draw it with blue
else
draw_sprite(spr_button, list[i] , x+i*32, y) // else draw it with the white onethis will go thru every item in the list until i gets higher then tot..
it will use the key numbers as image index, so put your sprites in the rigth order and it should show up correctly..
subimage list[0] will be drawn at x+0*32
subimage list[1] will be drawn at x+1*32
and so on
hopes this makes any sence..
and yeah .. I noticed now that I have typed right wrong ALL the way thru this post ><;;