As is allready seen in this thread the way to do is loops.
If you are not sure how loops work read on for here or if you want more detail have a look at the tutorial island section on this form.
There are 3 main types of looped used on scar.
ScarScript:By DrunkenoldmaRepeat</p><p> //Code Here</p><p> //Code Here</p><p>until { Watever }
that basiclly tells it self it will repeat the loop until something, you can repeat , a time , until you find a color , find a DTM etc.
For To Do Loop
The for to do loop is very good for TPAs and Loops to do with Lengths of Integers.
it looks like this.
SCAR Code:
For I:= 0 to 5 do
begin
Writeln(IntToStr(I));
end;
so that will repeat that loop 5 times because i defined it as I:= 0 to 5.
each time it goes through the loop it adds 1 onto the varable you defined it as ( I ).
the While Do loop
the while do loop is very simple and Imho it is under used here at SRL.
The is simply While Something Do this. As in While FindDTM do Wait.
Or While FlagPresnt do Wait.
Example:
SCAR Code:
while FlagPresent do
Wait(100);
I Hope you learnt something.