2DWorlds Forums
How does one make a script loop? - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Help (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=21)
+--- Thread: How does one make a script loop? (/showthread.php?tid=583)



How does one make a script loop? - al648 - 02-11-2013

game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/n7vlLVZ.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/YcE01Yn.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/KRkggFT.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/AShyHJN.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/tUKtw9k.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/XnG1gkg.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/XmJnHo5.png"
sleep(2)
game.World.Eggs.ParticleSystem.Image = "http://i.imgur.com/aRetluw.png"
sleep(2)

I have that,
and I've even tried loop()


RE: How does one make a script loop? - Void - 02-11-2013

I'm not big on scripting, but I'm pretty sure a while condition would fix this.

while true do
(code)
end


RE: How does one make a script loop? - al648 - 02-11-2013

Thanks void.