Quest System (with BP provided, UE4)

Quest Objective Completion (Pt6)



Objective: Eliminating actor and open Chest (Put those releant assets in the scene)

Open S_QuestObjective structure, add follow 2 variables:
image.png

Go to BP QuestGiver, S Quest variables, see if in Details, the objectives show Actors to Eliminate and Chest To Open. Need to complie before seeing them
image.png
In the scene, select the QuestGiver, Default → Quest → Index 0 → Objectives
name the objectives in Name/Aim, and add array elements in ObjectivesEle
(P.S. not do in QustGiver BP as it can’t reference)

Objective 1: Eliminate actors:


Put the actors/enemies need to eilminate in the scene.
Add array elements in Actors To Eliminate
Use dropper to choose them to each index
image.png

Open BPC Quest (a BP component attach to player for which objective are doing)

Add custom event Eliminate Enemy/actor (add input),
image.png
create the graph as below:
P.S. Remove node choose Remove item
image.png

Drag out from Array element as below, choose SEt by Ref Var to create the node
image.png
Contiinue finish the graph as:
image.png

Go to the BP enemy/actor
Extend the graph from what the actor will be destroyed/died as:
image.png

Go to BPC Quest, add a print
(on next episode, thiis part doens’t work)

Update a UI of WB Quest HUD, graph
add custom event Completed objective
image.png
Go to WB QuestObjective, add variable S Quest Objective:
image.png

Back to WB QuestHUD, add set objective variable from Create WB Quest Objective Widget
Connect its objective to for each loop array element
image.png
image.png

For the completed objective custom event, add input objective,
image.png
then connect graph as below:
image.png
image.png

To BPC Quest agian, add Quest HUD widget variable and completed objective node before print string, connect its objective to for each loop array elelment
image.png
image.png
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.