This script mainly detects when your unarmed, or armed, then will set the AI to not attack you if your unarmed, useful for undercover missions.
Installation / Usage:
Copy the code from init.sqf in the archive to your mission init.sqf, then copy the two scripts to your root mission folder.
You can edit the scripts if you want, you can add dialog as to what they will say if you get too close to them, and you can also change what side the code will run on.
Be careful with the combatant check, as it runs on every single AI, therefore each client will be running as many instances of the script as there is AI. This will cause performance issues with large missions with tons of AI.
Also note that AI is a bit retarded and gets confused when the player is set to enemy after being captive, they'll usuaully lay down and stare at you for a few seconds then begin shooting.
Credits & Thanks:
viper0317 - For the original Idea
- first release