generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Recalling loops

Previous Thread :: Next Thread 
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
20 Feb 2014 05:12 PM
How do I recall a loop? Can somebody explain to me how or post a link to a wiki page or something... I can't find it anywhere and I have a 77 line loop that needs to be recalled if a certain condition exists. Can somebody help?
Report Abuse
Delones is not online. Delones
Joined: 19 Jul 2010
Total Posts: 1703
20 Feb 2014 05:14 PM
turn it into a coroutine?

Time is a tool you can put on a wall, or wear it on your rizd.
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
20 Feb 2014 05:14 PM
while wait(0.5) do
if ... then

??
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
20 Feb 2014 05:21 PM
Put it in a function?

function loop()
(loop here)
end

if (condition) then loop() end
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
20 Feb 2014 05:22 PM
I mean like, if a certain condition exists within the loop, restart the loop from the beginning. I heard you can do that by recalling the loop but I don't know how and I can't seem to figure it out.
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
20 Feb 2014 05:23 PM
Erm, recalling function?

function loop()
for i, v in pairs(someTable) do
if (condition) then
loop()
end
end
end

Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
20 Feb 2014 05:31 PM
this is way to advanced for ScriptHelpers forum -_-
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
20 Feb 2014 05:33 PM
coroutine.resume(function)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image