Hi all,
I have a problem with quest list.
I am creating a world map and i wold like do something like this:
1) on separate scene in canvas UI i have created a map with few buttons: town, castle, forest.. etc.
2) I created few quests in ORK
and now I would like to do something like this:
when I click on castle button I would like to display all active quests connected with this place in separate panel.
So:
I would like to get list of active quest filtered by Castle and display it in panel.
Problem is: how can i get list of active quests. I cannot find a method in API (ORK.Quests?) which will work.
If this is not possible by ORK. I think about creating a separate list with quest structure like:
{
QuestName: "Find something",
Place: "Castle",
IsActive: true
}
and change IsActive flag via event system when quest will be activated.
maybe there is some other way?
Thank you for advice.
If you want to get a list of active quests for a quest type via code, you can use this:
List<Quest> quests = ORK.Game.Quests.GetQuestsByType(true, typeID, false, true, false, false);
The typeID is the ID/index of the quest type.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Town, Castle etc (add some quests to it)
and get it by GetQuestByType in loop for Quest Types.
Example:
Castle Quests - ID:1
Town Quests - ID:2
....
River Quests - ID:12093
List quests = ORK.Game.Quests.GetQuestsByType(true, 1, false, true, false, false);
The Quest class represents an actual instance of the quest and allows you to access the quest's states and tasks (i.e. it's not the quest's settings you defined).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!