Trigger Reference of GS2-Idle Script
receive
Event trigger to call GS2-Script before Receive Rewards.
Request
| Type | Description | |
|---|
| namespace | Namespace | Namespace |
| category | CategoryModel | Showcase model |
| userId | string | User ID performing the idle |
| config | Config[] | Set values to be applied to stamp sheet variables |
Result
| Type | Require | Default | Limitation | Description | |
|---|
| permit | bool | ✓ | | | Allow receive |
Implementation Example
namespace = args.namespace
category = args.category
userId = args.userId
config = args.config
result = {
permit=permit
}
receiveDone
GS2-Script called after Receive Rewards.
Request
| Type | Description | |
|---|
| namespace | Namespace | Namespace |
| category | CategoryModel | Showcase model |
| userId | string | User ID performing the idle |
| config | Config[] | Set values to be applied to stamp sheet variables |
Result
| Type | Require | Default | Limitation | Description | |
|---|
Implementation Example
namespace = args.namespace
category = args.category
userId = args.userId
config = args.config
result = {
}