Trigger Reference of GS2-Mission Script
Reference for event triggers that call extended scripts, as defined in GS2-Mission
missionComplete
Event trigger to call GS2-Script before a mission is completed.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
missionGroupModel | MissionGroupModel | Mission Group |
oldComplete | Complete | Before status of achievement |
newComplete | Complete | After status of achievement |
completeTaskNames | string[] | List of completed task names |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow mission accomplishment |
Implementation Example
namespace = args.namespace
missionGroupModel = args.missionGroupModel
oldComplete = args.oldComplete
newComplete = args.newComplete
completeTaskNames = args.completeTaskNames
result = {
permit=permit
}
missionCompleteDone
GS2-Script called after a mission is completed.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
missionGroupModel | MissionGroupModel | Mission Group |
complete | Complete | Status of achievement |
completeTaskNames | string[] | List of completed task names |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
missionGroupModel = args.missionGroupModel
complete = args.complete
completeTaskNames = args.completeTaskNames
result = {
}
counterIncrement
Event trigger to call GS2-Script before the counter rises.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
counterModel | CounterModel | Counter Model |
oldCounter | Counter | Before Counter |
newCounter | Counter | After Counter |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow counter rise |
Implementation Example
namespace = args.namespace
counterModel = args.counterModel
oldCounter = args.oldCounter
newCounter = args.newCounter
result = {
permit=permit
}
counterIncrementDone
GS2-Script called after the counter rises.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
counterModel | CounterModel | Counter Model |
counter | Counter | Counter |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
counterModel = args.counterModel
counter = args.counter
result = {
}
receiveRewards
Event trigger to call GS2-Script before GS2-Script to be executed upon receipt of reward.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
missionGroupModel | MissionGroupModel | Mission Group |
oldComplete | Complete | Before status of achievement |
newComplete | Complete | After status of achievement |
receiveRewardTaskNames | string[] | List of task names to receive rewards |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow counter rise |
Implementation Example
namespace = args.namespace
missionGroupModel = args.missionGroupModel
oldComplete = args.oldComplete
newComplete = args.newComplete
receiveRewardTaskNames = args.receiveRewardTaskNames
result = {
permit=permit
}
receiveRewardsDone
GS2-Script called after GS2-Script to be executed upon receipt of reward.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
missionGroupModel | MissionGroupModel | Mission Group |
complete | Complete | status of achievement |
receiveRewardTaskNames | string[] | List of task names to receive rewards |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
missionGroupModel = args.missionGroupModel
complete = args.complete
receiveRewardTaskNames = args.receiveRewardTaskNames
result = {
}