otterZ
Member
Hey guys, I will be the first to admit that I am not an elegant coder and tend to repeat lines of code that resembles spaghetti. I am trying to change this. Can anyone suggest a way to code my timer countdowns more elegantly? Here's some code as it is at the moment . . . repetitive and ugly. . . a hallmark of my coding style lol.
I am interested in how more experienced programmers would code this more succinctly / elegantly as I want to change my 'spaghetti/if it works who cares' type of approach as I want my code to be more readable.
GML:
timer20A[1] -= 1;
timer20A[2] -= 1;
timer20A[3] -= 1;
timer20A[4] -= 1;
timer20A[5] -= 1;
timer20A[6] -= 1;
timer20A[7] -= 1;
timer20A[8] -= 1;
timer20A[9] -= 1;
timer20A[10] -= 1;