GS2-Matchmaking Script Trigger Reference

Reference for event triggers that call extended scripts

Trigger

createGathering

creating a new gathering

Synchronous Execution Script

The script is executed synchronously before the creating a new gathering process.

Request
TypeDescription
namespaceNamespaceNamespace
gatheringGatheringGathering
Implementation Example
-- Request
local namespace = args.namespace
local gathering = args.gathering

-- Business logic:

-- Result
result = {
}

completeMatchmaking

the matchmaking completion

Synchronous Execution Script

The script is executed synchronously before the the matchmaking completion process.

Request
TypeDescription
namespaceNamespaceNamespace
gatheringGatheringGathering
Implementation Example
-- Request
local namespace = args.namespace
local gathering = args.gathering

-- Business logic:

-- Result
result = {
}

changeRating

Rating value changes

Synchronous Execution Script

The script is executed synchronously before the rating value changes process.

Request
TypeDescription
namespaceNamespaceNamespace
oldRatingRatingOld Rating
newRatingRatingNew Rating
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
✓
Whether to allow rating value changes
Implementation Example
-- Request
local namespace = args.namespace
local oldRating = args.oldRating
local newRating = args.newRating

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

Asynchronous Execution Script

The script is executed asynchronously after the rating value changes process.

Request
TypeDescription
namespaceNamespaceNamespace
oldRatingRatingOld Rating
newRatingRatingNew Rating
Implementation Example
-- Request
local namespace = args.namespace
local oldRating = args.oldRating
local newRating = args.newRating

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}