Quest System (with BP provided, UE4)

Quest System for UE5 (Pt1)



Create a folder called Quest in content broswer

Create BP Structure, name as S_Quest
image.png
Open it and add follow variables:
image.png

Create Quest Giver


Make a BP dummy mesh character, copy it into Quest folder
image.png

In the Copied BP dummy, rename as BP_QuestGiver, make the follow graph:
image.png
Add Overlap event begin and end on Trigger Radius component, make the graph as below:
image.png

Create a widget called WB_QuestInteractPrompt:
image.png
Make the text exactly in middle, or else may not be able to see it in BP character viewport:
Position X and Y are 0, Alignment 0.5, 0; Anchor choose middle:
image.png
Back to The BP Quest Giver, choose the Widge class in Interact Widget, and paste the text above his head
image.png
image.png
Disable the interactwidget visible
image.png
Drag the BP Quest Giver in the scene, try to see if the widget comes up when walk close to the giver

Create Interact to the player


Create a BP interface, called BPI_QuestGiver
Name the new function as Interact
image.png
Add the BPI in BP_QuestGiver BP class
image.png
Open Interact in Interface, make the graph print string to test:
image.png
image.png

Go to 3rd person BP, set below and test in game
image.png

Create Quest UI:


Make a Widget in Quest folder, called WB_QuestGiver
Hold left Ctrl when choose below anchor, will let the image fill the whole screen:
image.png
Tiling, black color, and alpha 0.3
Name the image as Background, then add bacground blur (strength 10)
Add text and finalize as below:
image.png

Replace the print string in BP QuestGiver
image.png
Add mouse cursor at end of SET node:
image.png

Modify the WB Quest by adding a vertical box:
image.png
also create a new WB called Quest Slot, add a button on it:
image.png
Add button text, on button layer, adjust style color,
normal: darkest grey, hovered: lighter, Pressed: Lightest
image.png
Further modify the WB Quest by adding a smaller Canvas panel in and:
image.png

Back to BP Quest Giver, add set Widget active node as false (or else the quest menu can only open once)
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.