GS2-Matchmaking Script トリガー リファレンス

拡張スクリプトを呼び出す イベントトリガー のリファレンス

トリガー

createGathering

ギャザリング新規作成

同期実行スクリプト

ギャザリング新規作成処理の前に、スクリプトが同期実行されます。

Request
説明
namespaceNamespaceネームスペース
gatheringGatheringギャザリング
実装例
-- Request
local namespace = args.namespace
local gathering = args.gathering

-- Business logic:

-- Result
result = {
}

completeMatchmaking

マッチメイキング完了

同期実行スクリプト

マッチメイキング完了処理の前に、スクリプトが同期実行されます。

Request
説明
namespaceNamespaceネームスペース
gatheringGatheringギャザリング
実装例
-- Request
local namespace = args.namespace
local gathering = args.gathering

-- Business logic:

-- Result
result = {
}

changeRating

レーティングの値変化

同期実行スクリプト

レーティングの値変化処理の前に、スクリプトが同期実行されます。

Request
説明
namespaceNamespaceネームスペース
oldRatingRating更新前のレーティング
newRatingRating更新後のレーティング
Result
必須デフォルト値の制限説明
permitbool
レーティングの値変化を許可するか
実装例
-- Request
local namespace = args.namespace
local oldRating = args.oldRating
local newRating = args.newRating

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

レーティングの値変化処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
oldRatingRating更新前のレーティング
newRatingRating更新前のレーティング
実装例
-- 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 = {
}