execute an object n times using for loop-like controls
group DVloop {
link+notify+IPort2 trigger;
float+Iparam start;
float+Iparam end;
float+Iparam incr;
float+Oparam count;
int+Oparam done;
method+notify_val+notify_inst upd_loop = "loop";
};
DVloop is a for/Do loop mechanism. It provides a way to iteratively execute an object. The basic structure is:
for ( count = start; count < end; count = count + incr )
Note: DVloop cannot be interrupted. You will likely want to use the almost identical, but interruptible Templates.GMOD.loop instead.
A link. When the object that this is connected to changes, DVloop begins to execute its for loop. For example, this could be connected to UItoggle.
A float. Sets the initial value of the for loop control variable. It is the
"for (count = start" clause.
A float. Sets the terminal value of the for loop's control variable. It is the "end" in "for ( count = start; count <end".
A float. Sets the increment to the for loop's control variable. It is the "incr" in
"for (count = start; count < end; count=count+incr". It must be non-zero.
A float. This contains the current value of the for loop's control variable. It is the "count" in the "for ( count = start" clause. DVadvect, for example, uses count to set its time step input.
An integer. When this is set to 1, the loop has finished executing.