> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 動作與規則

> 使用 PlayStream 動作與規則，透過觸發程序、條件和動作 (例如授與獎勵或傳送推播通知) 即時回應事件。

# 動作與規則

使用 PlayStream 規則即時回應 PlayStream 事件。規則包含：

* 僅一個觸發程序
* 選擇性的條件清單
* 觸發程序啟動時要執行的一或多個動作。

例如，如果您想要在玩家擁有超過 10,000 XP 時傳送獎勵給他們，並傳送通知給他們，您可以：

* 為您的使用者定義名為「High XP Players」的[區段](/zh-TW/services/playfab/live-service-management/game-configuration/segmentation/segmentation-overview)，並將準則設定為 **XP >= 10,000**。
* 建立由這些玩家進入 High XP Players 區段的 PlayStream 事件所觸發的規則。
* 為該規則設定兩個動作：
  1. 授與虛擬貨幣給區段中的玩家。
  2. 傳送推播通知以恭喜玩家，並讓他們知道收到了什麼。

## 另請參閱

* [動作與規則快速入門](/zh-TW/services/playfab/data-analytics/acting-data/action-rules-quickstart)


## Related topics

- [動作與規則快速入門](/zh-TW/services/playfab/data-analytics/acting-data/action-rules-quickstart.md)
- [了解配對中的規則權數](/zh-TW/services/playfab/multiplayer/matchmaking/rule-weights.md)
- [為票證指定屬性](/zh-TW/services/playfab/multiplayer/matchmaking/ticket-attributes.md)
- [ActionTrigger](/zh-TW/services/playfab/api-references/events/data-types/actiontrigger.md)
- [配對案例與設定範例](/zh-TW/services/playfab/multiplayer/matchmaking/config-examples.md)
