User Tools

Site Tools


hpl2:amnesia:script_language_reference_and_guide:control_flow_-_loops

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
hpl2:amnesia:script_language_reference_and_guide:control_flow_-_loops [2013/01/08 02:29]
thegreatcthulhu [The For-Loop]
hpl2:amnesia:script_language_reference_and_guide:control_flow_-_loops [2015/06/16 10:24] (current)
romulator [Discussion] Changed "peaces" to "pieces".
Line 37: Line 37:
 ===== Discussion ===== ===== Discussion =====
  
-Loops are a powerful tool; they allow you to execute ​peaces ​of code several times in a row, to iterate over array elements, to easily assign the same callback to several game objects using just one line of code, and more. This is achieved by providing a //​condition//​ which the loop uses to determine how many times, or for how long, it should repeat the execution of it's body (the part between ''​{''​ and ''​}''​). A loop cycle is also called an //​iteration//​.+Loops are a powerful tool; they allow you to execute ​pieces ​of code several times in a row, to iterate over array elements, to easily assign the same callback to several game objects using just one line of code, and more. This is achieved by providing a //​condition//​ which the loop uses to determine how many times, or for how long, it should repeat the execution of it's body (the part between ''​{''​ and ''​}''​). A loop cycle is also called an //​iteration//​.
  
 ==== The While-Loop ==== ==== The While-Loop ====
hpl2/amnesia/script_language_reference_and_guide/control_flow_-_loops.txt ยท Last modified: 2015/06/16 10:24 by romulator