Your Quest Reward
v4.0
Last updated
v4.0
Last updated
Creating a custom Quest Reward which can be easily managed in the Inspector is not that difficult. You will create three scripts, starting with one that inherits from QuestReward
.
Create a script which looks like this, but name it appropriately for your reward. The class in the image below is called PointReward
indicating that the quest reward may be provide a change in points, using the Stat module.
Change the default filename in the CreateAssetMenu
line. Then, change the menuName
path as well. You can choose to put your creation button in the same Game Modules/Quest Reward/[Name Here]
, or customize the path.
The class inherits from QuestReward
, so the GiveReward()
method is required. You will customize this script later. For now, lets finish creating the other two scripts.
This method is what does the actual work. This is where you will do all the reward giving, whatever that means for the context of the reward and your project.
Refer to the existing QuestRewards
to see how those have been created.