Quest System (with BP provided, UE4)

Treasure Quest (task complete tick) (Pt7)



Import treasure box asset
(With Anim seqeuence for open and close the box)

Create a BP class Actor, called BP_Treasure
Add mesh component and sphere collision, rotate and scale
image.png
Collision preset as Overlap Dynamic
image.png

Create BP interface, called BPI_Treasure
Open it, name as Open chest, add output and choose item in variable that cerated before in structure (or simply drag the Treasure mesh from component and create its variable to connect to the return node
image.png
image.png

Add the BPI in class setting in BP mesh
image.png
Double click the interface and make nodes as below
Create variable called item, make it visible
image.png

Open 3rd person BP
In Quest system made earlier, add a extra branch on false branch node between interact on below:
image.png
If making BPC equipment system in other tutorial,
can extend the graph as below:
image.png

Make completed objective in quest:


Go to details of the QuestGiver BP in the scene,
Add the objective in 1 of the index, untick completed, tick is chest objective, choose the BP_chest by dropper
image.png

Open BP Component Quest (made before)
Add custom event and input variable as chest,
image.png
drag ActiveQuest variable (split it), connect them to for each loop and as follow:
image.png
Continue
image.png
image.png

Open BP chest box (hotkey: select the asset in scene, then Ctrl E)
add follow cast to 3rd person after play animation node
image.png
Now after talk to quest giver, mission show but not tick,
will tick once the quest is completed

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.