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

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
oldCompleteCompleteBefore status of achievement
newCompleteCompleteAfter status of achievement
completeTaskNamesstring[]List of completed task names

Result

TypeRequireDefaultLimitationDescription
permitboolAllow 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

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
completeCompleteStatus of achievement
completeTaskNamesstring[]List of completed task names

Result

TypeRequireDefaultLimitationDescription

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

TypeDescription
namespaceNamespaceNamespace
counterModelCounterModelCounter Model
oldCounterCounterBefore Counter
newCounterCounterAfter Counter

Result

TypeRequireDefaultLimitationDescription
permitboolAllow 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

TypeDescription
namespaceNamespaceNamespace
counterModelCounterModelCounter Model
counterCounterCounter

Result

TypeRequireDefaultLimitationDescription

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

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
oldCompleteCompleteBefore status of achievement
newCompleteCompleteAfter status of achievement
receiveRewardTaskNamesstring[]List of task names to receive rewards

Result

TypeRequireDefaultLimitationDescription
permitboolAllow 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

TypeDescription
namespaceNamespaceNamespace
missionGroupModelMissionGroupModelMission Group
completeCompletestatus of achievement
receiveRewardTaskNamesstring[]List of task names to receive rewards

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
missionGroupModel = args.missionGroupModel
complete = args.complete
receiveRewardTaskNames = args.receiveRewardTaskNames

result = {
}