The Tween behavior animates the values of properties over time. For example you can "tween" an object's position to (100, 100), which will move it from its current position to the target position over time. Different ease functions can be used to alter the rate at which the value changes over time, for example using a Linear function for a constant-rate motion, In Out Sinusoidal for a sine-curve based movement which speeds up then slows down, and many more. Custom ease curves can also be designed with the Ease editor.
Click here to open an example of the Tween behavior.
The term "tween" comes from the term "Inbetweening", referring to generating intermediate frames in between two states.
Construct's Tween behavior has three types of tween:
These types are used by the three tween actions: Tween (one property), Tween (two properties) and Tween (value).
The Tween behavior can manage multiple tweens simultaneously. To help identify them separately, each tween can be given a tag, which is just a string of any name you like to identify the tween. The tag is optional and can be left empty if you don't need to modify or identify the tween at any point later on.
Tweens can also be given multiple tags, separated by spaces. This can be useful to group tweens together under a common tag while also providing a unique tag to target them individually.
Actions, conditions and expressions which expect tags as an argument will match any tweens which include all of the provided tags.
Given these tweens with these tags:
This will be the expected matches:
Note expressions can only return a single value. When specifying tags, expressions return the value for the first tween with all the given tags.