GS2-Matchmaking Script Trigger Reference

Reference of 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

matchmaking is complete

Synchronous Execution Script

The script is executed synchronously before the matchmaking is complete 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.
-- Use for logging, analytics, external notifications, etc.

result = {
}