GS2-Matchmaking Script トリガー リファレンス
拡張スクリプトを呼び出す イベントトリガー のリファレンス
トリガー
createGathering
ギャザリング新規作成
同期実行スクリプト
ギャザリング新規作成処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| gathering | Gathering | ギャザリング |
実装例
-- Request
local namespace = args.namespace
local gathering = args.gathering
-- Business logic:
-- Result
result = {
}completeMatchmaking
マッチメイキング完了
同期実行スクリプト
マッチメイキング完了処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| gathering | Gathering | ギャザリング |
実装例
-- Request
local namespace = args.namespace
local gathering = args.gathering
-- Business logic:
-- Result
result = {
}changeRating
レーティングの値変化
同期実行スクリプト
レーティングの値変化処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| oldRating | Rating | 更新前のレーティング |
| newRating | Rating | 更新後のレーティング |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | レーティングの値変化を許可するか |
実装例
-- Request
local namespace = args.namespace
local oldRating = args.oldRating
local newRating = args.newRating
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
レーティングの値変化処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| oldRating | Rating | 更新前のレーティング |
| newRating | Rating | 更新前のレーティング |
実装例
-- Request
local namespace = args.namespace
local oldRating = args.oldRating
local newRating = args.newRating
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}