nicked on 15/1/2011 at 08:22
OK I've finally got around to looking at this and I've got it working pretty well with PrivateRoom. I got the Debt Repaid A/R system working, but it's not ideal for my needs, as the guards become alerted at any open door, even if they can't see the player misbehaving.
I made a new metaproperty called M-AlertCapZeroNew, which is exactly the same as M-AlertCapZero except with an extra step in the responses to frob the objective failed button. Put that on the guards.
Made the M-PlayerBreach metaproperty and put AI>Utility>Watch: Watch Link Defaults - Player Intrusion, a radius and height of 8, Required awareness 2, Line of Sight, all that good stuff.
Added Scripts>PrivateRoom to the offlimits areas.
Now the guards will turn nasty, and frob the objective failed button, if I:
* Enter the room and they're watching.
* Run at them with a sword.
* Attack their buddies.
This works great! Just one thing left that's probably really simple but is tripping me up - if I sneak up behind the guard, he's not aware I'm there, and I backstab him, he instantly dies without getting a chance to frob the objective failed button. How can I trigger the button when a guard dies? I guess I could make the objective a No Kill objective (that can also be failed by a button push), but is there a more elegant way?
LarryG on 15/1/2011 at 11:23
My concern with PrivateRoom is that when you have a series of connected rooms which the player should not be in, if you only have PrivateRoom on the 1st room in the series, as the player penetrates into the other rooms, the metaprop is removed, and if you put PrivateRoom on them all, due to the necessary overlap of the rooms, the metaprop gets added twice before getting removed once. Does that work right? I don't think you can get two copies of the same metaprop, so the effect would be that you still don't have the metaprop on when in the 2nd room ...
As to your question, if he dies without knowing you're there, then you haven't failed the objective as you stated it: "... happy to ignore you, unless they catch you breaking the law." You weren't caught breaking the law. If you want a no kill outcome, a separate No Kill objective seems warranted. IMHO.
nicked on 15/1/2011 at 12:00
Well the actual wording of the objective is "Don't attack anyone or get caught breaking in anywhere you shouldn't be." so I wanted a catch-all.
I hadn't realised that about PrivateRoom, but I think it will still work as most of the off-limits areas are small.
Yandros on 15/2/2016 at 15:29
Quote Posted by nicked
Made the M-PlayerBreach metaproperty and put AI>Utility>Watch: Watch Link Defaults - Player Intrusion, a radius and height of 8, Required awareness 2, Line of Sight, all that good stuff.
I'm having some trouble with AIWatchObj links in Waterfront Racket and came here to try and clarify that I'm understanding the Line requirement setting right. What I want is for a goal to be failed if an AI actually can see the player, so I have the setting exactly as Nick does here - Awareness of 2 (Moderate) and Line requirement as Line of Sight. My assumption is that Line of Sight means that the AI can actually see the player, as opposed to Raycast which just means that there is an unobstructed path from the AI to the player, regardless of vision or light level. That is also confirmed by LarryG in this thread (although he is just quoting a tutorial):
Quote Posted by LarryG
“Line Requirement” is also a bit ambiguous. The three options mean:
None: The link will trigger doubtless where the object is, as long as it’s in the “watch cylinder”
Raycast: There must be some direct line, uninterrupted by objects that block vision, between the watching object and the intruding object.
Line Of Sight: The watching AI must be able to “see” the intruding object.
The problem is, it's not quite behaving that way. The AI are reacting and failing the goal if they spot me even crouched in complete darkness, and I can avoid it only by staying out of their visual range; in other words Line of Sight is behaving as I expected Raycast to behave. Now in WR we might be able to live with this and explain it away by the fact that the player isn't Garrett and hasn't his stealth abilities, but I would really like to know why it's happening and fix it if we're able. Anyone else have any similar experience or advice about alternative methods?
LarryG on 15/2/2016 at 20:06
My thinking is that "Line of Sight" behaves exactly as "Line of Sight" does in A/Rs. I don't think it cares about darkness. I think it only cares if an object which blocks AI vision is between the AI vision point and the player's bounding sphere when the player is within the “watch cylinder”. Maybe I'm wrong, but I would interpret it that way.
Yandros on 16/2/2016 at 02:15
Ah, well that makes some sense I suppose. But then what is raycast and how is it different?
Anyway, I suppose one way to do what I'm trying to do is to fail the goal under Alert Response when the AI goes to level 3. They can't go to level 3 without seeing the player, correct?
john9818a on 18/2/2016 at 18:11
In an small test mission I determined that Line of Sight and Raycast exhibit the same results. Both need an object that is in enough light and not obstructed by solid terrain or a door portal in order for the AI to see it. Other objects do not prevent the AI from seeing the object it is AIWatchObj linked to. When the Line Requirement is set to None then it does not matter how much light is present. Even in a pitch black room the AI in my test was able to see the object.
I also determined that with Line Requirement set to None the AI can be facing in any direction even 180 degrees away from the object and still see it. With either Raycast or Line of Sight the AI had to be facing the object.