 |
|
It is currently Tue May 21, 2013 2:35 am
|
View unanswered posts | View active topics
NPCs not responding properly to certain stimuli
| Author |
Message |
|
G-Flex
MJ12
Joined: Mon Jul 11, 2011 10:16 pm Posts: 496
|
 Re: NPCs not responding properly to certain stimuli
Yep. Bingo. Unfortunately, the relevant functions (relating to events propagating) are all native C++ functions, so we can't look at them and have pretty much no information on how they work. We don't know what other native or non-native functions they rely on, we don't know what sort of internal logic determines how events propagate to other pawns (or through map space), or anything like that. I would think that the visual AI events would work similarly to anything else that uses AICanSee() or CanSee(), but who knows what kind of quirky optimizations or other things are going on. Unfortunately, I think this is one of those things where no amount of understanding the game scripts will help, and even an expert in the Unreal engine wouldn't be able to say anything because this is all DX-specific anyway. You'd think that you could determine some patterns based on the circumstances under which a pawn will or won't respond to a stimulus, but I sure haven't been able to. Even using a big cubic brush to subtract out all the solid space around the tea house guard, rebuilding the map, and saving it doesn't help him react. Oh, except then he will if I'm standing behind him and talk to him to get him to turn around and notice my gun. Unless I'm standing in certain spots. This is basically insanity. For what it's worth, I don't think the presence of other pawns on the map makes a difference one way or the other. For instance, the canal guards don't react to guns being drawn even if there's only one of them left, and he's literally the only ScriptedPawn left on the map. So it doesn't seem to be an issue of the game only finding one target for an event, or anything like that... unless it's checking other actors too, or something completely bonkers like that.
Last edited by G-Flex on Mon Apr 09, 2012 2:20 am, edited 1 time in total.
|
| Sun Apr 08, 2012 7:49 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: NPCs not responding properly to certain stimuli
OMG I'm so pissed!!! Analyzing this guard I just realized that you can set the HomeTag to "Start" in order to have the NPC face the direction he is standing from the start without using a homebase. I've been placing homebases. I wonder what else uses the "start" property.
Anyway. It doesn't seem to be an attribute of the level. I brought the HKguard to my map, and he is reacting as he should to my weapon. I copied his AI attributes to one of my guards, but the guards are still not reacting as they should. Maybe we could find something in the game referencing the HKMilitary's class that is causing this?
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Mon Apr 09, 2012 12:38 am |
|
 |
|
G-Flex
MJ12
Joined: Mon Jul 11, 2011 10:16 pm Posts: 496
|
 Re: NPCs not responding properly to certain stimuli
That class in particular isn't special and isn't really specially referenced anywhere that I know of. For all I know, this problem exists elsewhere as well, and is just most obvious in Hong Kong. I'm not sure what you mean by "doesn't seem to be an attribute of the level", though. It's been demonstrated not to be an attribute of the guard itself, and positioning within the level matters. Patterns are kind of hard to discern here, but it's clearly more to do not with the NPC in question alone, but with some quality or another of the map itself and how the NPC is placed within it. In some way. Somehow. My brain hurts.
|
| Mon Apr 09, 2012 2:26 am |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: NPCs not responding properly to certain stimuli
Right, it doesnt have to do with the class...
I now think it is rotation, or view of the "upper left" quadrant. When the NPC is looking -X (left on the map) and +Y (up on the map). I had a guard patrol and he only reacted once he looked in either the leftward or upward directions (or any variant in between) that he was able to notice the weapon.
I think it also has something to do with the NPC not being stimulated by guns drawn by other NPCs. Apparently he will not get stimulated by another NPC with a drawn weapon. And if an NPC has a drawn weapon in his field of view, he will not react to the -player- having a drawn weapon either even in conditions he otherwise would have.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Mon Apr 09, 2012 9:32 pm |
|
 |
|
G-Flex
MJ12
Joined: Mon Jul 11, 2011 10:16 pm Posts: 496
|
 Re: NPCs not responding properly to certain stimuli
I think there's some truth to all of that.
Direction does seem to matter; in the market, if I turn the guards around, facing away from that particular alarm-wall seems to make a difference.
When they react to a shot, they react based on who params.bestActor is. Who is that? I don't know, because I don't know how the XAIParams struct is used or whether or not the AI event is received once for every actor sending it, or only once at a time in general, causing one event to block others.
|
| Tue Apr 10, 2012 9:07 pm |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: NPCs not responding properly to certain stimuli
Yeah. By sheer luck I witnessed something while testing things, and some insight can be derived from it:
I had a guard facing -X as he should and a civilian (which I was using to test bKeepWeaponDrawn) in front of him, but I had her weapon holstered to test whether the weapon simply being in her inventory would interrupt the stimuli.
It did not, and the guard became hostile ran up and fired at me. The civilian chick became aggravated, hating weapons/shot/whatever, and pulled out her pistol during the surprise period. Now the guard turned and fired his next shot at her. Implying that he was stimulated by the sight of her gun, as she had not fired her gun yet. And he did this despite facing -Y, or whatever.
So it is -not- that bHateWeapons can only work facing between -X and +Y, and it is -not- that it can only work on the player. It is only that these properties will not "Alarm" the NPC into a state where he will overlook these odd circumstantial restrictions. Something is interfering with the alarming of the NPC.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Tue Apr 10, 2012 10:32 pm |
|
 |
|
G-Flex
MJ12
Joined: Mon Jul 11, 2011 10:16 pm Posts: 496
|
 Re: NPCs not responding properly to certain stimuli
Are you sure he didn't start hating her simply because she started hating him (due to his gun being drawn)? I'm not sure how alliances work in that regard.
|
| Wed Apr 11, 2012 6:16 am |
|
 |
|
Neveos
X-51
Joined: Wed Mar 03, 2010 1:29 am Posts: 834
|
 Re: NPCs not responding properly to certain stimuli
I'm not sure, however, I think the NPC actually has to be stimulated by something other than her simply hating him, and she did nothing to stimulate him other than pulling her gun out. She had not even fired it. You know how they do. They pull their gun out, and stare at the offender during a surprise period.... yeah, i just tested it. Simply hating someone doesnt stimulate them. Firing a shot or something does. So I'm fairly certain the guard hated on her the moment she pulled the weapon.
_________________ http://www.youtube.com/watch?v=e3FfPUKuGsQ&t=8m0s
|
| Wed Apr 11, 2012 9:08 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
 |