Quest System (with BP provided, UE4)

Quest Objectives setting (Pt4)



Creaste Objective Box WB


Create a new BP structure, called S_QuestObjective
image.png
Add follow variables
image.png
Add variable S Quest Objective array in S Quest structure (made in Pt 1)
image.png
Also input following in Default Values column
image.png

Add a new widget called WB_QuestObjective
Set Image Anchor (Fill up by holding Ctrl), set tint to dark grey, alpha 0.3
Set Text Position to X, Y to 0, Fill Screen as Desired
image.png
Add Check box, adjust the anchor position XY and size XY to fit as follow:
image.png
Rename the layer (image as background, Text as Objective Text (tick variable), Checkbox as Completed CheckBox (tick variable)

Intergrate Objective WB in Quest Giver WB


Go to WB QuestGiver, add vertical box under secondary
Put it in Quest Detail Panel layer,
Rename as Objective Vertical Box, tick as variable
image.png
Go to its graph, on Select Quest node, extend
image.png
Then continue as
image.png


Go to BP QuestGiver, S Quest Details add 4 Array elements in Objective:
image.png
Change each index Objective from 1 to 4, tick Completed on first 2 index
image.png
Test in scene if all objectives are shown and if checked box have 2 ticks
image.png

Go to WB Quest Objective
Untick is Focusable in Checkbox column (so it can’t be clicked manually during gaming, only tickable by BP logic)
image.png

Go to WB Quest Giver, add Padding node
image.png


Objective WB in Quest HUD (top left column Widget)


Go to WB Quest HUD
Enlarge background and blur layers, add Vertical box name as Objective Vertical box, tick as variable
image.png
In its graph,
Add custom event Fill Objectives, add input array S Quest Objective
image.png
Copy the following nodes from WB QuestGiver, paste in WB Quest HUD
image.png
Continue the graph in HUD:
image.png

Go to BP Component Quest,
Add custom event Set Objectives and connect as below:
(drag active quest variable, and split it)
image.png

Go to WB Quest Giver,
add Set Objective node after Set Active Quest Text
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.