if global.step //if (keyboard_check_released(vk_space)) { if (curr_state_to != "NOCH") {curr_state = curr_state_to; curr_state_to="NOCH"; wait=1; break;} if (curr_state_to = "NOCH")&& (wait = 0){wait +=1; break; } else {wait = 0;} o_left = collision_line(x,y,x-30,y,object0,false,true); o_rght = collision_line(x,y,x+50,y,object0,false,true); if (o_left < 0) {o_left = instance_create(0,0,obj1); o_left.curr_state = 'NON';}; if (o_rght < 0) {o_rght = instance_create(0,0,obj1); o_rght.curr_state = 'x>';}; if ((curr_state!='S') && (curr_state!='S->')) {l_l = o_left.curr_state; l_r = o_rght.curr_state} switch (curr_state) { case '0':{ if (l_l = 'S->') {curr_state_to = '*'; set_states();} if (l_l = '*1') {curr_state_to = '01'; set_states();} if (l_l = '01') {curr_state_to = '01'; set_states();} if (l_r = '<01') {curr_state_to = '<01'; set_states();} if (l_l = '*3') {curr_state_to = '02^'; set_states();} if (l_l = '|X2|') {curr_state_to = '02^'; set_states();} if (l_r = '|X2|') {curr_state_to = '<02^'; set_states();} if (l_l = '03') {curr_state_to = '02^'; set_states();} if (l_r = 'X1') {curr_state_to = '<01'; set_states();} if (l_l = 'X1') {curr_state_to = '01'; set_states();} if (l_r = '|X1|') {curr_state_to = '<01'; set_states();} if (l_l = '|X1|') {curr_state_to = '01'; set_states();} if (l_r = '<03') {curr_state_to = '<02^'; set_states();} if (l_l = '03') if (l_r = '<01') {curr_state_to = '|X|'; set_states();} if (l_l = '01') if (l_r = '<03') {curr_state_to = '|X|'; set_states();} break; } case '|X|':{{curr_state_to = '|X1|'; set_states();} break;} case '|X1|':{{curr_state_to = '|X2|'; set_states();} break;} case '|X2|':{{curr_state_to = '(X)'; set_states();} break;} case '|X3|':{{curr_state_to = '(X)'; set_states();} break;} case '01':{ {curr_state_to = '0'; set_states();} if (l_r = 'x>') {curr_state_to = 'X1'; set_states();} if (l_r = '<02^') {curr_state_to = '|X|'; set_states();} if (l_l = '(X)') && (l_r = '(X)') {curr_state_to = '(X)'; set_states();} if (l_l = '(*)') && (l_r = '(X)') {curr_state_to = '(X)'; set_states();} if (l_l = '03') {curr_state_to = '|X|'; set_states();} if (l_r = '(X)') {curr_state_to = '<01'; set_states();} if (l_r = '<02') {curr_state_to = '|X|'; set_states();} if (l_l = '|X2|') {curr_state_to = '02^'; set_states();} if (l_l = '|X2|') if (l_r = '(X)') {curr_state_to = '|X|'; set_states();} if (l_l = '(X)') if (l_r = '(X)') {curr_state_to = '|X|'; set_states();} break; } case '<01':{ {curr_state_to = '0'; set_states();} if (l_r = '|X2|') {curr_state_to = '<02^'; set_states();} if (l_l = '02') {curr_state_to = '|X|'; set_states();} if (l_r = 'x>') {curr_state_to = 'X1'; set_states();} if (l_l = '(X)') && (l_r = '(X)') {curr_state_to = '(X)'; set_states();} if (l_l = '(*)') && (l_r = '(X)') {curr_state_to = '(X)'; set_states();} if (l_l = '03') {curr_state_to = '|X|'; set_states();} if (l_l = '(X)') && (l_r != '|X2|') {curr_state_to = '01'; set_states();} if (l_l = '(X)') && (l_r = '|X2|') {curr_state_to = '|X|'; set_states();} if (l_l = '(*)') {curr_state_to = '01'; set_states();} if (l_l = '(*)') if (l_r = '|X2|') {curr_state_to = '|X|'; set_states();} if (l_l = '(*)') if (l_r = '(X)') {curr_state_to = '|X|'; set_states();} break; } case '03':{ {curr_state_to = '0'; set_states();} if (l_r = '<01') {curr_state_to = '|X|'; set_states();} break; } case '02^':{ {curr_state_to = '02'; set_states();} if (l_r = '<01') {curr_state_to = '|X|'; set_states();} if (l_r = 'X1') {curr_state_to = 'X'; set_states();} break; } case '<02^':{ {curr_state_to = '<02'; set_states();} if (l_l = '01') {curr_state_to = '|X|'; set_states();} if (l_l = 'X1') {curr_state_to = 'X'; set_states();} break; } case '02':{ {curr_state_to = '03'; set_states();} if (l_r = '<01') {curr_state_to = '|X|'; set_states();} break; } case '<02':{ {curr_state_to = '<03'; set_states();} if (l_l = '01') {curr_state_to = '|X|'; set_states();} break; } case '<03':{ {curr_state_to = '0'; set_states();} if (l_l = '01') {curr_state_to = 'X'; set_states();} break; } case '*':{ {curr_state_to = '*1'; set_states();} if (l_l = 'S->') if (l_r = 'x>') {curr_state_to = 'V'; set_states();} break; } case 'X':{ {curr_state_to = 'X1'; set_states();} break; } case 'X1':{ {curr_state_to = '(X)'; set_states();} break; } case '(X)':{ if (l_l = '(X)') if (l_r = '(X)') {curr_state_to = 'V'; set_states();} if (l_l = '(*)') if (l_r = '(X)') {curr_state_to = 'V'; set_states();} if (l_l = '(X)') &&(l_r = 'x>') {curr_state_to = 'V'; set_states();} if (l_l = '(*)') &&(l_r = 'x>') {curr_state_to = 'V'; set_states();} break; } case '(*)':{ if (l_r = '(X)') {curr_state_to = 'V'; set_states();} break; } case '*1':{ {curr_state_to = '*2'; set_states();} break; } case '*2':{ {curr_state_to = '*3'; set_states();} break; } case '*3':{ {curr_state_to = '(*)'; set_states();} break; } } if (o_left.non){ with(o_left){instance_destroy();}} if (o_rght.non){ with(o_rght){instance_destroy();}} }