Jump to content
Sign in to follow this  
v0lus

AI detection

Recommended Posts

How would you modify a DetectedBy trigger so it only fires when 2 seconds after detection the detecting guy is still alive?

Share this post


Link to post
Share on other sites
How would you modify a DetectedBy trigger so it only fires when 2 seconds after detection the detecting guy is still alive?

Since, IIRC, knowsAbout value starts to drop as soon as spotting AI loses the view of target (or dies), you can try something in line of:

Trigger

Activation: east knowsAbout player == 4

Countdown: 2, 2, 2 (or Timeout, always confuse them)

On activation: alarm = true; publicVariable "alarm";

Another way:

init.sqf:

{if {side _x == east} then {_script = _x execVM "stealthInit.sqf";};} forEach allUnits;

stealthInit.sqf:

_soldier = _this;
waitUntil {_soldier knowsAbout player > 3};
sleep 2;
if {alive _soldier} then {alarm = true; publicVariable "alarm";};

Edited by DarkWanderer

Share this post


Link to post
Share on other sites

I've done some more testing and here's where I am, all based on using non-grouped enemies:

- KnowsAbout didn't reset at a unit's death or at least not fast enough. Also has the problem of below detectedBy-trigger.

- The detectedBy-trigger is not precise enough. It allows you to kill several enemies without setting of the alarm as long as they don't know where the shots came from. This works all fine when you shoot somebody from behind with a .45 pistol or SMG. But it's not so good if there's a guy watching his buddy drop, getting into combat mode but still not setting the alarm because he doesn't know where you are.

- So the best for me is as Phantom Six recommended to check if the behaviour is != "SAFE" and the unit is alive in a 5 second timeout trigger.

Condition:

(((behaviour g1) != "SAFE") and alive g1) or (((behaviour g2) != "SAFE") and alive g2)

How can I shorten this for more than 2 guys that are not in a group, still having it in a trigger?

Share this post


Link to post
Share on other sites
{(behaviour _x != "SAFE" and alive _x) } count [g1,g2,g3,g4] >0

Edited by F2k Sel

Share this post


Link to post
Share on other sites
I've done some more testing and here's where I am, all based on using non-grouped enemies:

- KnowsAbout didn't reset at a unit's death or at least not fast enough. Also has the problem of below detectedBy-trigger.

- The detectedBy-trigger is not precise enough. It allows you to kill several enemies without setting of the alarm as long as they don't know where the shots came from. This works all fine when you shoot somebody from behind with a .45 pistol or SMG. But it's not so good if there's a guy watching his buddy drop, getting into combat mode but still not setting the alarm because he doesn't know where you are.

- So the best for me is as Phantom Six recommended to check if the behaviour is != "SAFE" and the unit is alive in a 5 second timeout trigger.

Condition:

How can I shorten this for more than 2 guys that are not in a group, still having it in a trigger?

Nice idea with behavior, will use it.

Just use my "stealth init" script, but replace the condition. Heavy checks in trigger conditions are discouraged, because they hog performance.

Share this post


Link to post
Share on other sites

There is a feedback for that http://feedback.arma3.com/view.php?id=10143

and

http://feedback.arma3.com/view.php?id=13493

not to mention if you kill an un grouped man which AI shouldn't see because of an object it will still increases it's Knowsabout.

The shot isn't detected it only increases if the unit turns and faces the dead body, it can't see it though.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Since you can't change how the AI knows about you or sees you through walls anyway I'm going to focus on the consequences of being seen like a backup call, lights, flares, etc.

Here's my favorite setup to trigger an alarm with a timeout of 5 seconds:

{(_x knowsAbout player > 1.4 and alive _x) } count [g1,g2,g3,g4] >0

While DetectedBy alone would trigger instantaneously the above is giving your team enough time to coordinate and eleminate the guards. Good thing is you can also choose which guards are able to set the alarm at all.

Share this post


Link to post
Share on other sites

You can change knowsabout although it's a little clumsy.

[unit] join grpnull;

will reset knowsabout to zero but it also removes waypoints and if the unit can still see the object it resets to what it can currently see.

Share this post


Link to post
Share on other sites

Shooting with a suppressor will lower the decibel level down to hearing safe (140dB) especially on a rifle. I own an AAC M42000 I only shoot my rifles with a silencer. It is still very noticeable shooting with a silencer and you still have the crack of the bullet. I have not tried shooting it wet yet but not very practical in a combat environment. Shooting with a .45 silenced using subsonic ammo is not as noticeable. I hope that this makes it into the game in some way shape or form. I was also in OIF 1 in 2003, first time I was shot at they were using suppressed AK47s. I knew the direction they were shooting at us from but there was zero muzzle flash, still a very noticeable bullet crack.

Share this post


Link to post
Share on other sites
Shooting with a .45 silenced using subsonic ammo is not as noticeable. I hope that this makes it into the game in some way shape or form.

It's already in game. Try the Vermin SMG or .45 pistol, they don't have a bullet crack and the AI is also reacting quite different on it.

Share this post


Link to post
Share on other sites
...also in OIF 1 in 2003, first time I was shot at they were using suppressed AK47s. I knew the direction they were shooting at us from but there was zero muzzle flash, still a very noticeable bullet crack.

No biggie... Like, doesn't everyone get shot at?

WOW! Can't even imagine brother. :notworthy:

Share this post


Link to post
Share on other sites
It's already in game. Try the Vermin SMG or .45 pistol, they don't have a bullet crack and the AI is also reacting quite different on it.

Most .45 ammo is already subsonic I cannot remember what FPS the round has to be but I believe its in the 700 range. I'm sure a simple google search would turn up results. I have tried my hand at making a stealth mission already and from my results the best way to remain stealth is to never fire your weapon. If you do get noticed you better toss frags, mag dump (violence of action), and make the AI wish they were never created then get out of the area.

Share this post


Link to post
Share on other sites

- So the best for me is as Phantom Six recommended to check if the behaviour is != "SAFE" and the unit is alive in a 5 second timeout trigger.

Actually, by default, unit is in AWARE status so I use == "COMBAT" instead. Since if they're about to engage or are being shot at, they switch over to "COMBAT" mode.

Share this post


Link to post
Share on other sites
Therefore, if you are to make a stealth mission, that encourage the player to perform any kind of silent take down, it's better to keep the AI ungrouped.

I'm confident that an eventhandler that automatically ungroups killed units would help against this.

So basically just add this...

this addEventHandler ["Killed", { [_this select 0] join grpNull; }];

...to all enemy soldiers.

Share this post


Link to post
Share on other sites

Would that actually work since unless the game predicts that they died, wouldn't the other ones find out, then get un-grouped?

Or is it because they somehow see the body then report it?

The AI system really is weird, I still don't understand it properly and I have been playing ArmA for years.

Also if there are less groups, isn't that kind of more laggy because if you have a group of 10 all following a squad leader, I think it renders a lower quality AI and the squad leader AI makes most of the decisions but with single units if there were many of them I assume they would probably be more likely to make their own decisions and more "events" would happen to cause strain?

Lol I don't even know i'm rambling now.

-MikeTim

Share this post


Link to post
Share on other sites

AI can see dead ungrouped units through walls and it raisie their knowsabout which is a real stealth killer.

Share this post


Link to post
Share on other sites
I'm confident that an eventhandler that automatically ungroups killed units would help against this.

So basically just add this...

this addEventHandler ["Killed", { [_this select 0] join grpNull; }];

...to all enemy soldiers.

Tested it now, doesn't work. :(

Also, as when AI hears a shot, they'll start scanning the horizon and notice the player when they look into his direction (apparently even when he's hiding in cover).

To put it nicely... the whole system is FUBAR.

Share this post


Link to post
Share on other sites

Tajin is almost there except if memory serves you have to have the group join grpnull and then reform it.

It's the only way I know of wiping the AI's memeory, if they still see you it resets to the current value.

The down side is it wipes all memory and waypoints.

I can't believe how many basic and essential commands are missing and yet we get patches for things like accelerator pedal not being displayed correctly or something like that.

Just allow us to use negative numbers in reveal to give of half a chance of stealth mission.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×