(Optional) Part 1
In the "Convai Content" folder will be located under the "Engine" folder
Open Convai Plugin map,
open the Compansion BP, where introduce 3 action funcitons: pick up, drops, change colors
Part 2
In Metahuman BP, extend the event begin play node (from Transcription and Other Event tutorial), add Environment and Actions:
Add on action received
Optional, can jump this and go to create the graph with For Each loop
Following is for reference shows how the node works: Set For each loop and graph as
Go to Meta Player BP (downloaded alternatively from a 5.1 demo project and migrate to my 5.2 project)
On the Space Bar node, set the start and finish talking under the environment graph as follow:
tick Plane View on the green node, and tick generative action in start talking node
contiunue:
continue:
Now Go back to metahuamn BP, modidy the description in Make Array (improve accuracy of AI undetstand)
(Optional, help to understand with print sting shown)
On Action to received node, extend the print string node
Test in game to see if it shows as:
name: player,
action: move to
whole action string: move to player
If it works, remove the strings components in BP and set implement the move to action:
P.S. : make sure the metahuman class setting, Parent class is at least Pawn, not actor
In Class defaults, BP Beryan, Pawn, AI Controller Class, set as AI Controller Convai
Go to Plugin folder, Convai Content, Core,
Open Convai Base Character BP:
Go to methauman BP, copy Floating Pawn movement components, paste in convaibasecharacter BP
(allow the convai character moves around the scene)
Copy the following 2 functions from Convai Base Character to metahuman BP (to let metahuman rotate to face the player when walking, and always stick on the ground)
Copy the follow nodes in event tick (except handle simple lipsync) in convai base character
Paste in metahuman node (event tick node will become customevent, just delete it)
Recreate Set Actor in focus variable (will have error after complie)
Remove Then 0 in remove execution pin from Sequence
Drag a NAV mesh bound volume in the scene
Test if the character walks over
Add more actions:
Go to metahuman BP, Make array, add:
Test by voice:
Hey, can u follow me?
See if he keeps following if players move
Can u stop following me, please?
See if he stops