User Guide
Appendix 3. Fast loops
Many times in your program of events, you need to repeat the same action a certain number
of times. There are a number of ways of achieving this: you can use the “Repeat” condition
from the special object menu, or use a counter to count the number of repeats.
Multimedia Fusion provides you with a safe and very fast way of repeating the same actions:
the fast loops.
What is a fast loop?
A fast loop is a system that will repeat the same events a given number of times, at fast
speed.
How to create a fast loop?
First of all you need to initialise the loop. Open the action pop-up menu of the special object,
and open the Fast loop submenu. You will find an action called “Start loop”. This action
asks for two parameters:
• The name of the loop. This must be a string depicting the name of your loop, choose it
short and easy to recognise.
• The number of times to loop. Enter the number you wish here.
Now you need to create a new “On loop” condition. Click on New condition, and open
the condition pop-up menu of the special object. In the bottom of the menu you will find an
“On loop” entry. Choose it. The program now asks for the name of the loop, enter the same
name as before. You now have a new line of condition.
Now enter the actions you want to execute after this condition.
How does it work?
When Multimedia Fusion encounters the Start loop action, it searches for the On loop
conditions of the program. If it finds one, it compares the name of the loop, if it is the same,
it executes the actions of the event (if not it continues the search). Once the actions are
executed, it increments the loops counter and repeats the actions: the actions are called at
high speed the exact number of times you entered.
• You can have more than one “On loop” conditions in the program for the same loop.
• You can retrieve the number of the loop in an expression: a “Get loop count” function
exists in the special object functions menu.
• You can also create a loop within a loop creating a nested loop. But be careful about
the processing time of such nested loops as they it can be very long.
68