> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/projectile-factory/projectile-factory-documentation/observers-global-observers-and-observer-objects/toggle-objects-at-events-observer-object.md).

# Toggle Objects At Events Observer Object

v1.0

This `ObjserverObject` toggles a `List` of objects on and off at defined lifecycle events of the **Projectile**.

<figure><img src="https://2431624982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MY3N_li2jPq7az6mYfq%2Fuploads%2FJB3kTRuFkV4s0N5P5MUr%2FScreenshot%202024-04-09%20at%205.34.43%E2%80%AFPM.png?alt=media&amp;token=abf31be4-a772-4a4c-9d6b-9fb8ddeada9d" alt=""><figcaption></figcaption></figure>

By default, the **Start** and **Launch Projectile** events are selected for "turn on", and **Collision Enter** for "turn off".

{% hint style="info" %}
"Start" will only happen once, and the "Launch Projectile" event will not fire the FIRST time the projectile is launched, only on subsequent times (after returning from the pool). Therefor, having both selected will cover all launch events.
{% endhint %}

Check out the class. Each event has additional parameters that aren't being used here. You can create a custom class that derives from this, and override the events to make use of the parameters for more interesting logic.
