Go to content

Main menu:

Quick Tips for Multimedia Fusion 2 and Clickteam Fusion

Rate This Tutorial
Vote: 5.0/5
If you have read any of these tips, rate it from poor (1) to average (3) to great (5)!

General Tips

Quotations in Expressions

You can input in single quotation marks ( " ) by typing two quotation marks  ( "" ) in the Expression Editor.

For example:

" ""Hello World"" returns "Hello World"

Layers & Collisions

Collisions are layer dependent. If Object A is on layer 1 and Object B is on layer 2, the two objects can never trigger any collision related event.

Likewise, you can improve performance by splitting collisions across layers.

Does not apply to physic-related collisions. These collisions are not layer dependent and thusly can cause a collision on any layer.

HotSpots in Actives

Hot spots determine at what pixel an object's position is calculated at. If you try to get an object's position and the hot spot is located at (0,0), the position expression will always return the object's top left corner coordinates.

Hot spots also determine the center point when an object rotates. Ball objects should have hot spots in the center of the object while platform objects should have hot spots placed at the object's "feet."

Picture Editor Shortcuts

Mass Hot Spot, Action Point, Crop:

Control + Shift + <Click on the Respective Button>

Each tool also has their respective hotkey which you can view by hightlighting the tool.

Image of the MMFusion action point tooltip

Short Circuit Evaluation

Clickteam Fusion uses Short Circuit Evaluation when events are processed. Essentially, if you have an event with 30 conditions and the first condition is false, the other 29 conditions are not even checked.

As such, unless proper object scoping is needed, you should leave performance heavy events, such as overlaps, towards the bottom of an event's condition list. This simply trick greatly improves performance.

Order of Execution within the Event Editors

In MMFusion, you may keep your events bundled in the Event Editor or you may spread your events throughout the editors.

The order of execution for the various editors is as follows:

1. Event Editor (top to bottom)
2. Global Event Editor (top to bottom)
3. Behaviours (top to bottom)

a. Executed in order of object (not instance) creation during edittime
b. Executes even if no instances of the object exist during runtime

Install Directory for Programs
On Windows, the installation path of many applications can be found within the registry under the "HKEY_LOCAL_MACHINE" key with the "InstallPath" subkey.

For Clickteam Fusion the key and subkey are as follows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clickteam\Fusion Developer 2.5\Settings > "InstallPath"

For Multimedia Fusion the key and subkey are as follows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Clickteam\Multimedia Fusion Developer 2\Settings > "ProPath"
Picture Editor Mass Import
If you have a set sequentially named images named "Image 1", "Image 2", "Image 3", etc... you can batch import theseimages into the Picture Editor by choosing the first image and checking the "Import as Animation" checkbox in the import pop-up window.

"Import as Animation" checkbox in the Picture Editor
Limiting an Expression's Range

You can easily limit the range of a variable by using the Range() function within Clickteam Fusion which has the following format:

Range(MyVariable, lower-limit, upper-limit)

In Multimedia Fusion 2, you will need to use the following expression:

Max( Min( MyVariable, upper-limit), lower-limit)

Explanation of other native MMF2 and Clickteam Fusion functions can be found in the "Extension Editor Basics" reference guide.

Floating Point Values in the Expression Editor
By default, the Expression Editor returns all values as integers. This setting may cause issues if an expression uses division, as shown below:

Integer Division
    • 100 / 7 = 14

You can force the Expression Editor to return floating point values (and use floating point division) by using an expression which naturally returns an floating point value, such as Cos(), or by using floating point literals in the equation, such as 1.0.

Floating Point Division
    • ( 100 * 1.0 ) / 7 = 14.2857...
    • ( 99 + 1.0 ) / 7 = 14.2857...
    • 100 / 7.0 = 14.2857... 
    • ( 100 + 0.0 ) / ( 7 + 0.0 ) = 14.2857...
    • Etc...
MMFusion Groups

Always place, sort, and organize your events into groups! Groups are a way to organize code within MMFusion. You can name groups, protect groups with a custom password, nest groups within other groups, and enable/disable groups during runtime. Furthermore a group is deactivated, all events and sub-groups within the group are also deactivated! 

Group manipulation is a powerful technique and can open many new doors within MMFusion.

Window Dimensions
The left and right borders of an application's border both fills 8 pixels per side. The bottom border fills 8 pixels. Finally, the top border also fills 8 pixels while the title bar fills 23 pixels totaling to 31 pixels.
 Image of an application with a Windows 8.1 borde (heading)
Overall, the border provides a 16 pixel of horizontal padding and 39 pixel of vertical padding.
The Hardware Acceleration Runtime

You can enable HWA (Hardware Acceleration) by changing the Display Mode to Direct3D 8 or Direct3D 9 (preferred). HWA allows the application to execute with more optimizatoin and consequently run faster.

Optimization with Object Selection

The Create Object's conditions are fast compared to an object's Alterable Variable comparision condition. Like really fast. EXTREMELY FAST. 

When you have performance issues with object selection, try scoping with any condition from the above image, specifically from the "Pick objects with reference to their value"


Expression for Application Window + Height

While there is no explict equation to retrieve the window dimension for an application, you can implicitly extract the dimensions with the following equations:

Window Width:

X Right Frame - X Left Frame

Window Height:

Y Bottom Frame - Y Top Frame

Expression for Center of Screen Location

Below is a simple expression to find the coordiantes of the window's center.

X Coordinate:

X Left Frame + ( ( X Right Frame - X Left Frame ) / 2 )

Y Coordinate:

Y Top Frame + ( ( Y Bottom Frame - Y Top Frame ) / 2 )

General Easing Formula

Generic Easing Formula:

Current or Offset Value + ( Min( Ease Speed, AbsDistance between values ) ) * ( ( Distance between values ) / AbsDistance between values ) ) )

Easing Formula with Object Position:

Current Position + ( Min( Ease Speed, AbsCurrent Position - Destination Position ) ) * ( ( Current Position - Destination Position ) / AbsCurrent Position - Destination Position ) ) )

This formulas are intended to be used with the "Set X-Position" and "Set Y-Position" of object actions. The subtrahend of both equations represents the actual displacement of the object. If the easing formula eases in the opposite direction, you may need to change the '+' symbol to a '-' symbol.

Sign of a Number

You can retrieve the sign of a number with the following equation:

Return the Sign of a Number:

Number / Abs(Number)

If 1 is returned

Number is positive

If -1 is returned

Number is negative

Be sure to test if the number is 0 to avoid possible runtime errors.

Forcing Multiples

If you need to force a value to be a multiple of another value, use the formula below:

Grid or Forced Multiple Formula:

( Input Variable / Base Multiple ) * Base Multiple

All of the above values should be integer values.

Modulo Counter

If you want to created a frame-based counter use the following formula:

+ Always

- Add 1 to <some value>
Set <some value> to <some value> mod <incrementing timer>

+ If <some value> mod <incrementing timer> = 0

- <Insert Set of Actions here>


Object Name Limit

The limit for names for any object during runtime is 24 characters. Any character past the 24th is cutoff. Keep object's names under 24 characters to avoid possible oddities in your program.

Physic Engine Object Deletion

If an application uses any physic movements/objects, do not delete the  Physic Engine Object attached to the object during runtime! If a required Physic Engine Object is missing, the entire application crashes.

Fastloops and the Object Scope

The object scope before and after a fastloop differs from the original object scope if the fastloop executes any actions. These changes are typically unintentional so be aware of the possible change in object scope!

Case Sensitivty in FastLoops & ForEach Loops
The Fastloop and ForEach loop conditions are case insensitive. This means On Loop "AB", On Loop "Ab", and On Loop "aB" all execute when a fastloop named "ab" executes.
Fastloops are case insensitive
Back to content | Back to main menu