edited May 2021 in ORK Support
hi
i am trying to implement the following system through Ork's quest system.
Quest 1 name "Tutorial Quest"
Quest Task 10
name each
"Level 1"~"Level 10"

Each task is cleared when a monster kill or a specific action variable(level up button clicked etc..) is raised.

The problem is, I want to display these situations in my custom ui.

1. Is there a way to access the current player's active quest, current task stage(level1~10),progress(3/10),rewards, etc. through scripting? (Not in editor data access, in a running game currently player have)

2. When the quest above is in the Level 3 Task stage, does the script automatically recognize the current stage? Or do I need to compare the current task stages through a switch statement?


Post edited by KESHYAS on
  • You can access the player's quests via ORK.Game.Quests, which has various functions to manage and get quests/tasks.

    E.g. if you want to get a specific quest:
    Quest quest = ORK.Game.Quests.GetQuest(questID);
    questID is the ID/index of the quest.

    Or to get all active quests:
    List<Quest> activeQuests = ORK.Game.Quests.GetQuestsByType(false, -1, false, true, false, false);
    The various parameters here let you limit to a specific quest type and quest states. The parameter name are pretty straightforward, so your IDE should give you enough information to use them :)

    The Quest instances you get here are not the settings of the quest, but give you access to the settings and the quest's tasks, etc.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.