# Light

{% hint style="success" %}
**COPY/PASTE PARAMETERS**

New in GM 0.11! Right click on a behaviour or component to copy. Then open an object, add the same behaviour or component, and right click it to paste identical parameter settings.
{% endhint %}

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHDhRbIm8VPOzAq48afFX%2FGM%20light%20com%20opt.webp?alt=media&#x26;token=b12b1531-bb18-46a1-9312-673f3ecde6ad" alt=""><figcaption></figcaption></figure>

<div data-full-width="false"><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FXehsf4DszZxNttXfDBHX%2FGM%20light%20com%20logic%20opt.webp?alt=media&#x26;token=0d8bad19-d7b9-4ec4-9400-94c10eac7bc0" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
[build-singleplayer-and-multiplayer-logic](https://docs.sandbox.game/en/creator/game-maker/docs/build-singleplayer-and-multiplayer-logic "mention") - about <mark style="color:green;">**\[SP]**</mark> or <mark style="color:yellow;">**\[MP]**</mark> behaviours or components.
{% endhint %}

## <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FkhWV85girzzxecmSWQ2L%2Fimage.png?alt=media&#x26;token=dd935948-d302-4b72-8901-de8a0aa12a3c" alt="" data-size="line"> Light <mark style="color:green;">\[SP]</mark> <mark style="color:yellow;">\[MP]</mark>

## Common Uses

* Light fixtures, spotlights, campfires, soft glow to emphasise emissive Assets
* Dark spaces with negative light
* Child Objects for pickable items (flashlights, torches, etc), moving Objects (vehicle headlights), etc.
* Visual hints or puzzles
* Localised ambience and storytelling
* Environmental highlights (to add emphasis in addition to [**Weather Switcher**](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/visual/weather-switcher) settings for sky, light color, and shadows)
* Applying light to avatars via [**Avatar's Feature**](https://docs.sandbox.game/en/creator/game-maker/behaviours/basic-logic/spawn-point-and-avatars-feature#avatars-feature-components), with a <mark style="background-color:yellow;">new offset parameter in 0.11</mark> for better implementation.

## Parameter Notes

| Options                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/PoAndph5Socff0rfHgHA/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Light Type</strong> (dropdown)</p><ul><li><strong>Point Light</strong> emits light <mark style="color:green;"><strong>around</strong></mark> the object in all directions.</li><li><strong>Spot Light</strong> emits light <mark style="color:purple;"><strong>in front</strong></mark> of the object in a cone shape.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/HTtygc5zT3mS4EdAAPpw/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | **Starting State** - Set the light be <mark style="color:green;">**on**</mark> or <mark style="color:red;">**off**</mark> at the start of the Experience.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/Ud1R4l208zPog0PwP2DL/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Intensity</strong> (slider: 1-100) - Determines the brightness of the light.<br><br><strong>NOTE:</strong> This value is used to prioritize how different light sources will blend together.<br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F6wBtLwddaybvoumKlcv6%2FGM%20Light%20com%20intensity.webp?alt=media&#x26;token=6c9b3c0f-0010-4b32-8f8c-9fb989f7accb" alt=""></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/Z1rkyHOO2Jl2ru9ohdcv/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | **Range** (slider) - Defines how far from the source the light will reach in blocks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/J99knW4u2qOiTiRW3dF2/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Falloff</strong> (slider) - Increase or decrease the gradient of intensity from the center of the light source. <br>A lower value creates a softer edge at the range set, while a larger number creates a harder edge.<br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Fmd0zYMcqpSRcdYAxrhi0%2FGM%20Light%20com%20falloff.webp?alt=media&#x26;token=658e26d8-10d0-4250-9d2a-0e8729e9da43" alt=""></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2Foh96C7NHCCtpqWNXmVd9%2Fimage.png?alt=media&#x26;token=53dd8632-e5a5-4e22-b238-7cf1ad755034" alt="" data-size="original">                                                                                                                                                                                                                                                                        | *<mark style="color:green;">**Spot Angle**</mark>* (Spot Light - slider) - Set the angle for the cone shape of a spot light (relative to the center of the light cone).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><img src="https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/Paf64WsywWmN572zHwUq/image.png" alt=""><br><br>When you click on the colour box:<br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FmHdatkD6rkRcosh2VQ7F%2Fimage.png?alt=media&#x26;token=5318438a-78b3-4d31-a474-4550dc6adb5b" alt=""><br><br>Note: You MUST Click <mark style="color:blue;"><code>Apply</code></mark> so your settings will be saved.<br><br></p> | <p><strong>Light Color</strong> - Select the colour of the light from a color picker or by inserting a <mark style="color:purple;"><strong>Hex Code</strong></mark>. The preview box (top left) updates as you adjust.<br><br>Adjust by moving the crosshair in the selection square or dragging the arrows in each slider:<br><strong>RGB</strong> - Red, Green, and Blue primary colors<br><strong>HSV</strong> - Hue, Saturation, and Vibrance present<br><br>Filter color options in the selection square:<br><strong>HS</strong> - Hue and Saturation</p><p><strong>HV</strong> - Hue and Vibrance</p><p><strong>SH</strong> - Saturation and Hue</p><p><strong>SV</strong> - Saturation and Vibrance</p><p><strong>VH</strong> - Vibrance and Hue</p><p><strong>VS</strong> - Vibrance and Saturation<br><br><strong>Hue</strong> <br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FGUFh9bds0TwFuzV2Qfbg%2FHue.jpg?alt=media&#x26;token=27dcc81c-d4ad-49d2-87e6-34f4914d4cb4" alt=""><br><strong>Saturation</strong><br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FbuZmQgQ2KHou3lf0jfzA%2FSaturation.jpg?alt=media&#x26;token=2b5f8c94-efee-4313-b2da-1b52a764e689" alt=""><br><strong>Vibrance</strong><br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FoTC7hr3aTJIbp5Jq9YKE%2FVibrance.jpg?alt=media&#x26;token=a626dada-fedb-49e6-955a-e60f8d292c78" alt=""></p> |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/aqbJMJbKUghQrmQuNzr4/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Subtractive</strong> - Remove light if True<br><br><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F48ydFaTdocUJsZKXNO6E%2Fimage.png?alt=media&#x26;token=d7d84d59-a1f6-4e75-9f94-acb49ec31f16" alt=""><br><br><strong>NOTE:</strong> When normal light and subtractive light overlap, they will blend depending on which light has the greatest <strong>Intensity</strong> value.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/BUE4wLetPf8rsPYCTxj8/image.png)                                                                                                                                                                                                                                                                                                                                                                                                                               | <p><strong>Message to Turn ON</strong> - Add the message(s) required to turn <mark style="color:green;"><strong>on</strong></mark> the light.<br><br><strong>Message to Turn OFF</strong> - Add the message(s) required to turn <mark style="color:red;"><strong>off</strong></mark> the light.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F09fj5jDlwjWlS8PnAGvn%2Fimage.png?alt=media&#x26;token=3d6c848b-d5dc-489a-a1e6-db516d4ad9f1" alt="" data-size="original">                                                                                                                                                                                                                                                                        | <p><strong>Position Offset</strong> (<mark style="background-color:yellow;">new in 0.11</mark>) - Offset the light from the actor the component is applied to. <br><strong>Note:</strong> This parameter improves <strong>Light</strong> use when applied as an <a href="../../../behaviours/basic-logic/spawn-point-and-avatars-feature#avatars-feature-components"><strong>Avatar's Feature</strong></a>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandbox.game/en/creator/game-maker/docs/components/display/light.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
