r/tf2scripthelp • u/FactoryBuilder • Sep 04 '20
Question Finite Loop
I know that I can make an infinite loop with an alias referencing itself but it there a way to have an alias be executed X times before it stops itself?
5
Upvotes
View all comments
Show parent comment
3
u/Skaib1 Sep 04 '20
Actually, you can do it a lot more efficient. Let's say you want to iterate my_alias N times.
For example, if you want to run my_alias 857 times, use this calculator to get 1101011001 and put: bin_1; bin_4; bin_5; bin_7; bin_9; bin_10 into the alias of start loop. This template script will work for any N less than 210. You can easily keep going to go as high as you want.