Making the UI follow the NPC
Re: Making the UI follow the NPC
So I didn't add the lua component to the dialogue manager, after testing it again it now seems to work (sort of), basically the NPC seems to only switch to stationary when they reach their waypoint, until they reach it they keep walking and then because of that they also refuse to turn around. Is there anyway to make the switch to stationary immediately?
Re: Making the UI follow the NPC
Try using SetEmeraldDestination() first to change the destination point to the NPC's own position (i.e., stop).
Re: Making the UI follow the NPC
hi, so this is my lua code, sadly it did not work, no errors:
Code: Select all
SetEmeraldDestination("go=Stark", "stop");
SetEmeraldBehavior("go=Stark", "passive");
SetEmeraldWander("go=Stark", "stationary")
Re: Making the UI follow the NPC
That seems to work for me. Are there any errors or warnings in the Console window?
You can try adding a slight delay to the LookAt() sequencer command to allow the AI to come to a stop first:
Here's a simple example scene:
DS_TestEmeraldAIFacePlayer_2021-01-15.unitypackage
Walk north (up) and right-click on the NPC named "XXX".
You can try adding a slight delay to the LookAt() sequencer command to allow the AI to come to a stop first:
Code: Select all
LookAt(listener)@0.5
DS_TestEmeraldAIFacePlayer_2021-01-15.unitypackage
Walk north (up) and right-click on the NPC named "XXX".