The Fade behavior fades objects in and out by changing the object's opacity over time. By default, it makes an object fade out over 1 second then destroys it.
Fades run in the following order. If any of the times are 0, the step is skipped.
- The object fades in from invisible to its set opacity, over the Fade in time.
- The object remains at its current opacity for the Wait time.
- The object fades out to invisible, over the Fade out time.
- If Destroy is set to After fade out, the object is then destroyed.
For example, with each time set to 1 second, the object will fade in from invisible for 1 second, wait for 1 second, then fade out to invisible for 1 second.
It is recommended to leave Destroy set to After fade out. If set to No, the object still exists after fading out, but is invisible. If many objects are using the Fade behavior, this can build up many invisible objects over time, which gradually use more memory and CPU causing the game to slow down.
Activate at start
If Yes, the object will begin fading as soon as it is created. If No, the fade will not run until you use the Start action.
Fade in time
Time, in seconds, to fade in from invisible. If 0, the fade in is skipped.
Time, in seconds, to wait between fade in and fade out. If 0, the step is skipped.
Fade out time
Time, in seconds, to fade out to invisible. If 0, the fade out is skipped.
If set to After fade out, the object is automatically destroyed after the fade out finishes. If No, the object is never destroyed by the behavior. Be sure to destroy objects yourself as necessary, as a build-up of invisible faded-out objects can cause the game to slow down.
On fade-in finished
On wait finished
On fade-out finished
Triggered when each stage of the fade finishes.
Run the entire fade from the beginning again.
Set fade-in time
Set fade-out time
Set wait time
Set the corresponding properties described under Fade properties.
If Active on start is No, this will begin the fade.
Return the corresponding properties described under Fade properties.