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
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| gathering | Gathering | Gathering |
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
| 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.
-- Use for logging, analytics, external notifications, etc.
result = {
}