<!-- Page: https://rustic-game-engine.pages.dev/docs/api/effects -->

# Effects

Fade, flash, shake and pulse entity properties with shared easing.

[Feature status and language/platform compatibility](https://rustic-game-engine.pages.dev/markdown/reference/compatibility.md)

Choose an API to see its signature, parameters, examples and behavior.

## APIs

- [Effects.fade()](https://rustic-game-engine.pages.dev/markdown/api/effects/fade.md)
- [Effects.flash()](https://rustic-game-engine.pages.dev/markdown/api/effects/flash.md)
- [Effects.shake()](https://rustic-game-engine.pages.dev/markdown/api/effects/shake.md)
- [Effects.pulse()](https://rustic-game-engine.pages.dev/markdown/api/effects/pulse.md)

## Module guide

## Setup and language support

These engine-owned services work in Lua 5.4, Luau, JavaScript, Python, C, C++, C#, Java, PHP, and HTML inline JavaScript. Follow [Use gameplay actions](https://rustic-game-engine.pages.dev/markdown/guides/gameplay-actions.md) to create and attach a script, install external toolchains, and choose the correct language binding. PHP and HTML scripts belong under `ui/`; CSS alone runs no gameplay code.

The Calls section uses JavaScript signatures. The function examples below include native syntax for all ten script types, including SDK-specific alternatives and limitations. Attach a JavaScript Object Component script to the specified target and press **Play**. Globals are supplied by the engine. Schedule actions from `Start` or a callback, rather than at script top level. Native languages use typed options and their own builder conventions; see the guide's language bindings.

## Parameters

Entity is a stable ID or scene path. Opacity is scalar, Color is RGB, Scale is a three-component vector, and shake strength controls the position offset. Duration is finite non-negative seconds; easing defaults to Linear.

## Return and timing

Each returns an operation handle. Flash and pulse ping-pong through the outgoing and return legs; their duration applies to each leg. Fade changes Opacity once; shake restores its initial position.

## Behavior and limitations

- A Part flashes red and returns to its original color after two quarter-second legs.
- Opacity and Color obey bounded property contracts. These actions operate on existing properties rather than creating particles or arbitrary UI components.
- Shake uses deterministic decaying offsets. Avoid overlapping actions or physics that write the same property. Camera.shake uses the same implementation.
- Check script attachment, enabled state and the Console when an operation fails. Asynchronous errors also appear in operation state. Callback exceptions disable the owner and clean up its actions.
- Owner destruction, disable, successful reload or Stop cleans up owned actions and subscriptions. Failed reload retains the previous behavior's operations. See [Operation handles](https://rustic-game-engine.pages.dev/markdown/api/operation-handles.md) for controls and lifetime details.
