Trigger Reference of GS2-Limit Script
Reference of event triggers that call extended scripts
countUp
Event trigger to call GS2-Script before Count Up.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| limitModel | LimitModel | Limit model |
| counter | Counter | Counter |
| userId | string | User Id |
| countUpValue | int | Amount to count up |
| maxValue | int | Maximum value allowed to count up |
Result
| Type | Require | Default | Limitation | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Allow count up |
Implementation Example
namespace = args.namespace
limitModel = args.limitModel
counter = args.counter
userId = args.userId
countUpValue = args.countUpValue
maxValue = args.maxValue
result = {
permit=permit
}
countUpDone
GS2-Script called after Count Up.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| limitModel | LimitModel | Limit model |
| oldCounter | Counter | Counter before update |
| newCounter | Counter | Counter after update |
| userId | string | User Id |
| countUpValue | int | Amount to count up |
| maxValue | int | Maximum value allowed to count up |
Result
| Type | Require | Default | Limitation | Description |
|---|
Implementation Example
namespace = args.namespace
limitModel = args.limitModel
oldCounter = args.oldCounter
newCounter = args.newCounter
userId = args.userId
countUpValue = args.countUpValue
maxValue = args.maxValue
result = {
}