multigate reverse from last pin

Hi I created a simple program that loads materials on the run, but what if there are 20 different materials (pins), and i go to pin 3 for example and i want to go back, for examle every time i press spacebutton i go one pin down, how to stop and reverse it any time with soem other button for example

Use a “switch on int” instead of a multigate.


K goes forward.
L goes backwards.

Thanks a zilion times EvilCleric, it worked perfectly, and made my day, have a nice day sir, and thanks a gain