Spread Value

From Mario Fan Games Galaxy Wiki

Spread Value in MMF/TGF is a common method of assigning a unique value to each instance of a given object. Generally, a spread value is much easier to work with than fixed values, especially with fastloops, as the values are contiguous; however, like other value assignments in MMF/TGF, you can't always predict which object will get each value.

Spread values start at a number specified by the user, and can be stored in an alterable value or string. They always increase by 1 for each object instance, which makes it easy to loop through each instance; this generally the easiest and most common way to force MMF to treat instances individually, even when object selection would dictate otherwise. Essentially, Spread Value allows you to create a foreach loop.

However, when instances are deleted, "holes" will remain in the value range, so it is a good idea to re-spread the value after a Destroy action. Similarly, a re-spread should also be performed after new instances are created, to ensure they are also assigned a value.