> ## 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.

# player_triggered_action_executed_cloudscript

> player_triggered_action_executed_cloudscript 事件。

当 CloudScript 函数作为 PlayStream 操作的结果运行，并勾选了 "Publish results as a PlayStream Event" 框时触发此事件。

## 属性

| 名称                         | 类型                                                                                                      | 说明                                        |
| :------------------------- | :------------------------------------------------------------------------------------------------------ | :---------------------------------------- |
| CloudScriptExecutionResult | [ExecuteCloudScriptResult](/services/playfab/api-references/events/data-types/executecloudscriptresult) | CloudScript 函数的结果，包括错误信息。对调试有用。           |
| FunctionName               | String                                                                                                  | 被调用的 CloudScript 函数的名称。                   |
| TitleId                    | String                                                                                                  | 此玩家事件适用的游戏 ID。                            |
| TriggeringEventData        | object                                                                                                  | 触发此 CloudScript 函数运行的事件的完整 JSON 数据。对调试有用。 |
| TriggeringEventName        | String                                                                                                  | 触发此 CloudScript 函数运行的事件的名称。               |
| TriggeringPlayer           | [PlayerProfile](/services/playfab/api-references/events/data-types/playerprofile)                       | 触发此 CloudScript 函数运行的玩家的 JSON 数据资料。       |

## 通用属性

所有 V1 PlayStream 事件均格式化为 JSON 对象，并共享以下通用属性：

| 名称             | 类型                                                                          | 说明                                                                                                                                                                                |
| :------------- | :-------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EntityId       | String                                                                      | 此事件适用的实体（title、player 等）的标识符。                                                                                                                                                     |
| EntityType     | String                                                                      | 此事件适用的实体（player、title 等）的类型。如果 PlayFab 需要对此实体执行操作，则 EntityType 必须为 "player"、"character" 或 "title"。要求 PlayFab 当前不解析的任何实体类型都应加上命名空间前缀（如 "com.mygame.guild"），因为 PlayFab 可能随时开始解析根实体。 |
| EventId        | String                                                                      | PlayFab 为此事件分配的唯一标识符。                                                                                                                                                             |
| EventName      | String                                                                      | 此事件的名称。                                                                                                                                                                           |
| EventNamespace | String                                                                      | 分配给此事件的命名空间。例如："com.myprogram.ads"                                                                                                                                                |
| Source         | String                                                                      | 此 PlayStream 事件的来源名称；如果事件源自我们，则为 PlayFab。                                                                                                                                         |
| SourceType     | [SourceType](/services/playfab/api-references/events/data-types/sourcetype) | 此事件的来源类型（PlayFab 合作伙伴、其他后端或来自 PlayFab API）。                                                                                                                                       |
| Timestamp      | DateTime                                                                    | 与此事件关联的时间（UTC）。                                                                                                                                                                   |


## Related topics

- [PlayFab 的 PlayStream 事件模型参考](/zh-CN/services/playfab/api-references/events/index.md)
- [player_triggered_action_executed_function](/zh-CN/services/playfab/api-references/events/Functions/player-triggered-action-executed-function.md)
- [player_action_executed](/zh-CN/services/playfab/api-references/events/Player/player-action-executed.md)
- [player_executed_cloudscript](/zh-CN/services/playfab/api-references/events/CloudScript/player-executed-cloudscript.md)
- [cloudscript_executed](/zh-CN/services/playfab/api-references/events/CloudScript/cloudscript-executed.md)
