From ec67737cd3b887499788f81a23f393d30cebbe3b Mon Sep 17 00:00:00 2001 From: Kyle Austad Date: Thu, 17 Oct 2024 11:19:06 -0600 Subject: [PATCH] Update Quick Start --- Quick-Start.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Quick-Start.md b/Quick-Start.md index b87b24e..3717b8a 100644 --- a/Quick-Start.md +++ b/Quick-Start.md @@ -34,4 +34,20 @@ Once you have a data table created, each row is a unique quest. In the *Row Name Back in your character pawn, select the quest manager component and find the variable in the details panel called *Quests Data Table* and assign the table you just created/edited to that variable. Also input your starting quest in the *Initialize Quest Component* function. -![](https://git.crabinteractive.com/kyaustad/SimpleLinearQuests/media/branch/main/Media/Docs/4.png) \ No newline at end of file +![](https://git.crabinteractive.com/kyaustad/SimpleLinearQuests/media/branch/main/Media/Docs/4.png) + +## Creating Objectives + +Lastly, you need something for the player to actually do to progress their objectives. Included in the demo files is a *BP_BaseItem*. It contains two variables so for the quick start guide I will show how to use this item but the functionality can be used at any time by any actor. + +![](https://git.crabinteractive.com/kyaustad/SimpleLinearQuests/media/branch/main/Media/Docs/5.png) + +If you are implementing this with your own item or NPC simply create these 2 variables. Really you only need the 'QuestsAndObjectives' variable if you aren't deleting the object when it updates an objective. *QuestsAndObjectives* variable is an array of *S_Objectives* structs where you can define the corresponding objective names and how much to update their progress by in the *ObjectiveQuantity* field. The *ObjectiveDescription* field of the struct is unused here. + +Drag an instance of *BP_BaseItem* into your world and under the details panel add items to the *QuestsAndObjectives* array to correspond to the objectives you want to update. If you want that instance of *BP_BaseItem* to delete when it updates an objective or not, set *ShouldDeleteOnObjectiveUpdate?* accordingly. True means it will delete. + +Now walking launch the game and when your character pawn collides with the instances of *BP_BaseItem* it will check if any of its assigned objective names match the current quests current objective and update accordingly. If you plan to implement the quest updating on a different actor, say during an existing dialogue system interaction or upon pulling a lever, all you have to do is on that different actor have an array of *S_Objectives* structs and assign your objectives to update in there. Then, when you wish to trigger the objective update call two functions: the global function *Get Player Quest Component* and from the returned component from that function, call *Update Current Quest*. On that function pass in your *QuestsAndObjectives* variable to the function and if you wish the triggering actor to be destroyed, pass in a *self* reference into the *Interacted Actor* input on that function. + +![](https://git.crabinteractive.com/kyaustad/SimpleLinearQuests/media/branch/main/Media/Docs/6.png) + +That's it! Passing an array of objective structs (which can contain only 1 objective if you only need that actor to update a single objective) into the *Update Current Quest* function will update the quests according to the flow and structure set in your *Quests Data Table* assigned on the Player Quest Manager. \ No newline at end of file