ID:263120
 
Code:
        Arrow_Right
name = ""
icon_state = "ArrowRight"
MouseEntered(src)
icon_state = "ArrowRightMove"
MouseExited(src)
icon_state = "ArrowRight"
Click()
for(var/mob/ChooseCharacter/Male/Elf/E in usr.client.screen)
if(E.screen_loc == "5,14")
E.screen_loc = "3,14"
return
if(E.screen_loc == "3,14")
E.screen_loc = "1,14"
return
if(E.screen_loc == "1,14")
E.screen_loc = "5,14"
return
for(var/mob/ChooseCharacter/Male/Human/H in usr.client.screen)
if(H.screen_loc == "3,14")
H.screen_loc = "1,14"
return
if(H.screen_loc == "1,14")
H.screen_loc = "5,14"
return
if(H.screen_loc == "5,14")
H.screen_loc = "3,14"
return
for(var/mob/ChooseCharacter/Male/Taruu/Tar in usr.client.screen)
if(Tar.screen_loc == "1,14")
Tar.screen_loc = "5,14"
return
if(Tar.screen_loc == "5,14")
Tar.screen_loc = "3,14"
return
if(Tar.screen_loc == "3,14")
Tar.screen_loc = "1,14"
return


Problem description:

When I click the arrow, only the Elf(E) moves. I tried taking out the returns, but that causes more chaos, IE one moving at a time, when they should all move, or having to click multiple times before any of them move.
Instead of using return, use break,and if you spawn each for() loop, they won't wait on each other.
In response to Detnom
Hahaha, thanks!
In response to Dead_Demon
else if() would have also worked, but without the returns, that is assuming, of course, that there was only one of each mob in the screen. break is probably better, though.