Hi,
First, I apologise for the long post (I just want to be sure that new people in the editor understand what I'm saying) and my english that is not my first language.
The problem
In a stealth mission you want to be able to infiltrate an enemy sector, silently kill guards and sentries, dispose of their bodies, accomplish whatever tasks you were assigned, and extract without the enemy even knowing you were there.
One can imagine the enemy base with soldiers in safe behaviour slowly patrolling their sector until an enemy is detected (visual or sound) or an anomaly, like a dead body, is encountered.
Unfortunately, this is not actually possible with the engine default behaviour. Why?
Simple. It is normal for a soldier in safe behaviour to switch to a combat behaviour as soon that he is aware of enemy presence. In other words, as soon as his knowsAbout about the detected unit is not 0 anymore. But it is not normal that a soldier knows about you as soon as you silently kill one of his comrade 200 meters away.
I dont believe that this is a bug. A knowsAbout value of 1.5 is automatically given to an unit when he gets knowledge of a comrade (presence and position of the killer if he is alive, presence only if he is dead) and when he gets shot without having previous knowledge of the shooter. In other words, it seems that an unit inherits the knowsAbout properties of another unit when he gets knowledge of him, partially if dead.
This behaviour is not without logic since Arma is much more a battlefield simulation than a specop one, but completely unsuitable for stealth mission.
Another thing that I've found, and this is definitely a bug, is that you can throw a grenade in the middle of an enemy camp and if nobody is killed or injured, it will go unnoticed. They detect anything else (even in careless behaviour) but not grenades.
The solution
Since we cant change the way units perceive their environment we have to focus on the way they react to it.
The script set the enemy soldiers behaviour to CARELESS. In this behaviour they are still aware of their environment but will not react to it. Their knowledge of enemy units is monitored so we can decide when we want them to react. The script also monitors dead bodies encountered (also based on his knowsAbout but on another object attach to the body) and grenade explosion.
Test Setup
2 russian riflemans named s1 and s2 with a very simple patrol route.
s2 has his mobility disabled at start (s2 disableAI "move") in his initialization box.
2 radio triggers:
[0-0-1] s2 enable Move --> to start moving s2
[0-0-2] s2 switchCamera --> to switch the camera on s2
Difficulty on Normal.
=== TEST #1
- Kill the soldier to your left (s1). Once he detects you, you have about 10 seconds to kill him before the alarm is raised. Dont let him fire a shot or the other soldier (s2) will probably be alerted and eventually raise the alarm. The test will fail if the alarm is raised.
- Hide and enable the other soldier (s2) to move (0-0-1)
- Switch on him (0-0-2) to have a view of his perspective and watch him until he discover the body and the alarm is eventually raised.
Has you will see, he will rapidly gain knowledge of his dead comrade and about a second after, OF YOU! he might not know exactly where you are (since his comrade is dead) but he automatically knows who you are and that you are present. The body will be detected later when he gets closer and eventually the alarm will be raised.
=== TEST #2
- Kill the soldier to your left (s1).
- Move to his position and hide him using the option 'Hide body' in the action menu.
- Hide and enable the other soldier (s2) to move (0-0-1)
- Switch on him (0-0-2) to have a view of his perspective and watch him continuing his patrol like nothing has happend.
Has you will maybe see, he might gain knowledge OF YOU even if there is nothing to detect. His knowsAbout on you might jump to 1.5 (when s1 got killed) but since we know what this value means, we'll not let him react to it.
This is impossible to achieve with the engine default behaviour only.
I would definitely appreciate feedback from anyone trying it. Maybe, together, we can eliminate bugs and refine the script into something usefull.
Thank you for reading
Cheers