Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Getting how many times a loop has ran
- minniesworld
-
Scratcher
500+ posts
Getting how many times a loop has ran
forever
change [times run v] by (1)
end
(times run) // counter
- securitytower
-
Scratcher
14 posts
Getting how many times a loop has ran
set [loop index v] to [1]
repeat (amount)
...
change [loop index v] by [1]
end
(loop index) // counter
- hacktronics
-
Scratcher
100+ posts
Getting how many times a loop has ran
The loop index is cumbersome, that's why we use count in CodeSkool.
count (VAR) from (0) to (4) in steps of (1)
count (VAR) from (0) to (4) in steps of (1)
Last edited by hacktronics (June 10, 2025 02:56:17)
- The-Animation-Pro
-
Scratcher
100+ posts
Getting how many times a loop has ran
Create a new variable.
when green flag clicked
set [loop index v] to [0]
forever
~insert code here~::grey
change [loop index v] by (1)
end
- Discussion Forums
- » Developing Scratch Extensions
-
» Getting how many times a loop has ran