# Rewarded

{% hint style="info" %}
There are some advertisement settings in the `playgama-bridge-config.json` file

[playgama-bridge-config](https://wiki.playgama.com/playgama/sdk/playgama-bridge-config "mention")
{% endhint %}

**Rewarded ads** are a type of advertisement where players have the option to watch an ad in exchange for in-game rewards

Offer players rewards in exchange for watching ads, incentivizing ad engagement and increasing ad revenue.

#### Is Rewarded Supported

Check if the platform supports displaying rewarded ads.

```gdscript
Bridge.advertisement.is_rewarded_supported
```

#### Rewarded Ad State <a href="#rewarded-a-d-state" id="rewarded-a-d-state"></a>

Monitor the state of the rewarded ad to manage the reward process.

```gdscript
Bridge.advertisement.rewarded_state
```

Returns the current state of the rewarded ad. Possible values: `loading`, `opened`, `closed`, `rewarded`, `failed`.

{% tabs %}
{% tab title="Godot 3.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong># To track rewarded ad state changes, connect to the signal
</strong>func _ready():
    Bridge.advertisement.connect("rewarded_state_changed", self, "_on_rewarded_state_changed")

func _on_rewarded_state_changed(state):
    print(state)
</code></pre>

{% endtab %}

{% tab title="Godot 4.x" %}

<pre class="language-gdscript"><code class="lang-gdscript"><strong># To track rewarded ad state changes, connect to the signal
</strong>func _ready():
    Bridge.advertisement.connect("rewarded_state_changed", Callable(self, "_on_rewarded_state_changed"))

func _on_rewarded_state_changed(state):
    print(state)
</code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
React to changes in ad state. For example, mute the game sound when the state is `opened` and unmute when the state is `closed` or `failed`.
{% endhint %}

{% hint style="danger" %}
Reward the player only when the state is `rewarded.`
{% endhint %}

#### Rewarded Placement <a href="#show-rewarded-a-d" id="show-rewarded-a-d"></a>

Monitor the current placement of the rewarded ad to manage the reward process.

```gdscript
Bridge.advertisement.rewarded_placement
```

#### Show Rewarded Ad <a href="#show-rewarded-a-d" id="show-rewarded-a-d"></a>

Display a rewarded ad and provide incentives to players for watching the entire ad.

```gdscript
var placement = "test_placement" # optional
Bridge.advertisement.show_rewarded(placement)
```


---

# 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://wiki.playgama.com/playgama/sdk/engines/godot/advertising/rewarded.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.
