Trigger Reference of GS2-Idle Script
Reference for event triggers that call extended scripts, as defined in GS2-Idle
overrideAcquireActions
Event trigger to call GS2-Script when Dynamic script to determine the action to obtain the placement reward.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
categoryModel | CategoryModel | Category Model |
userId | string | User ID |
Result
| Type | Require | Default | Limitation | Description |
---|
acquireActions | AcquireActionList[] | ✓ | | 1 ~ 100 items | List of acquire actions for each waiting time |
Implementation Example
namespace = args.namespace
categoryModel = args.categoryModel
userId = args.userId
result = {
acquireActions=acquireActions
}
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 |
status | Status | Status |
acquireActions | AcquireAction[] | Rewards |
config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow receive |
rate | float | | 1.0 | ~ 1000 | Acquisition quantity rate |
Implementation Example
namespace = args.namespace
category = args.category
userId = args.userId
status = args.status
acquireActions = args.acquireActions
config = args.config
result = {
permit=permit,
rate=rate
}
receiveDone
GS2-Script called after Receive Rewards.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
category | CategoryModel | Showcase model |
userId | string | User ID performing the idle |
oldStatus | Status | Status |
newStatus | Status | Status |
acquireActions | AcquireAction[] | Rewards |
config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
category = args.category
userId = args.userId
oldStatus = args.oldStatus
newStatus = args.newStatus
acquireActions = args.acquireActions
config = args.config
result = {
}