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
Type Description
namespace Namespace Namespace
gathering Gathering Gathering
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
Type Description
namespace Namespace Namespace
gathering Gathering Gathering
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
Type Description
namespace Namespace Namespace
oldRating Rating Old Rating
newRating Rating New Rating
Result
Type Required Default Value Limits Description
permit bool
✓
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
Type Description
namespace Namespace Namespace
oldRating Rating Old Rating
newRating Rating New 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 = {
}