obj
buttontrain
name = "Shuttle"
icon = 'icon.dmi'
icon_state = "off"
density = 1
Click()
if(src in oview(1))
if(on == 0)
if(shuttle1 == 1)
on = 1
for(var/obj/buttontrain/O in world)
O:icon_state = "on"
for(var/obj/train/O in world)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
O:y += 1
sleep(1)
for(var/obj/buttontrain/O in world)
O:icon_state = "off"
on = 0
shuttle1 = 0
else
on = 1
for(var/obj/buttontrain/O in world)
O:icon_state = "on"
for(var/obj/train/O in world)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
O:y -= 1
sleep(1)
for(var/obj/buttontrain/O in world)
O:icon_state = "off"
on = 0
shuttle1 = 1
Ok i coded a train tile in my game and placed it in a 3 by 7 square and made a button to move it up and down, but instead of all the blocks moving at the same time it moved them one at a time,creating a jigsaw effect where the tran is taken apart piece by piece and placing them in the new location, does anybody know how to make it move all the train objs in world at one time rather than it cycling through them.