Yandros on 29/4/2015 at 19:24
So I got a humorous surprise testing a mission today. I had just added a new AI whose patrol route generally circles the manor in the center of the map, and I set him to random patrol just so it's not so predictable. After a while, I had managed to unlock both doors to the mansion, and the guy decided to use it as a shortcut to get from one TrolPt to another, since with the doors unlocked, it was navigable and the most direct route. Now this isn't his manor, so it's hardly appropriate or realistic for him to do that, but obviously I can't solve this with pathfinding or else no AI would be able to use go in and out of the mansion. Anyone know of a way to get only this one AI not to take the route through the house? If not, I'll probably just disable random patrol to prevent it.
FireMage on 29/4/2015 at 19:33
My solution: A marker with AIWatchObj link.
Do that this one will work not from sight but raycast.
If the AI is in Alert 0 or 1 and go in the marker effect, the AI will frob a hidden button that will trig a conversation that will command the guard the follow the path you want him to follow to reach the other side! ;)
Of course you will have to do at least two conversation according to the different side, but it will work! :) I just hope you will just put a single guard for this patrol or you will be obliged to make even more conversations... :/
You could do the converse directly with a AIWatchObj link to the marker... But I fear that your guard will be unable to cancel his action if he got alerted...
john9818a on 30/4/2015 at 00:15
I had the same problem. I used exrra Trpts to make sure the AI went around the building.
Actually I missed the part about random patrols. :o
Could you use two AI and have each randomly patrol each side of the house?
Yandros on 30/4/2015 at 00:18
Well John, I don't see how that can help when I have random patrol on. If it picks one on the opposite side of the map, he's going to go through the house because it's the most direct route.
Jordan, that's a good suggestion and should probably work, but it's more trouble then I want to deal with right now, especially for just "flavor" AI (they're just there to add some variety to the mission), so I just disabled random patrols for them for now. Thanks for the responses though.
john9818a on 30/4/2015 at 05:11
Russ I forgot to mention that if you have two patrol routes that are independent of each other then the guard should randomly pick a TrolPt from whatever patrol route he is following. Also if he chases a player to the other side he might go through the house anyway to get back to his side.
john9818a on 10/1/2016 at 00:33
Russ I came across a problem I was having and found a solution that may work for you but only if you never want that specific guard to go through the door in question.
Here is what I did:
Set the size of the doorway & door to 3.75.
Add AI -> AI Core -> AI Needs Big Doors to the specific AI or archetype if needed.
Set the Menu Editors -> Gamesys Parameters... -> AI Gamesys Path Options -> Large Door Size to 4.00.
Optimize & Run Pathfinding.
This will effectively prevent the AI from pathfinding through that door but will allow it to pathfind through other doors. Other AIs can still pathfind through this door.
In my mission I wanted to allow servants to enter a freezer but keep guards from entering, and it works quite well.
Nameless Voice on 10/1/2016 at 00:54
Bear in mind that the guards will then shake their fist and refuse to enter that room even if they are chasing the player.
Another thing that you could do is a little crazier.
Make an invisible, non-physical door that blocks the path, lock it, and give the guards who are allowed to go through it the key.
The doors shouldn't affect the player at all, but the pathfinding should tell guards who don't have a key that they can't go through there.
Yandros on 10/1/2016 at 01:54
That sounds like it should work, thanks for the suggestion. I think I just made his patrol not random to solve this for now, so I'll have to revisit it when I get back to DCE.
ZylonBane on 10/1/2016 at 02:56
Put a unique stim on the guard, and a receptron near where he's not supposed to go. If the receptron fires, blow the guard up. Or tell him to patrol somewhere else, I dunno.
R Soul on 10/1/2016 at 02:58
The AI stop walking while opening doors. Increasing the frob distance and open speed may also help.