Use GetDistance as dialog condition?

Post » Tue Apr 23, 2013 4:00 am

I have a situation where I need one actor to be within a specified distance to another actor before a dialog is valid. You guys may remember me working on a scene where my guard Captain trains the guards at practice targets? That all works great, but the only problem is that the guy training is doing so by a perpetually running scene from 9AM to 9PM. But the guards swap between their patrol routes and practicing 2 times during the day. So what happens is when the guards leave the practice targets to go patrol, my trainer is left standing there barking out commands with no guards in his vicinity until the ones coming to train arrive. So I need to condition his commands to only be valid when the guards are near him.

I tried using GetDistance, with my guard as the Target you can select, so it looks like this:

Run on Subject - GetDistance - [Target MyGuard] < 300

I thought that would say, "this dialog is only valid if MyGuard is < 300 units from me" so that if the guard was out of the area he wouldn't say the line. However, it's not working because he still says his lines while standing there alone.

I also tried switching the Run on to Target from Subject but that didn't work either. Do I need to set it to reference? Or am I completely misunderstanding the way this condition works? If so, how can I condition this dialog to only be valid when my guards are near my trainer?

Thanks!
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am

Return to V - Skyrim