@dynamicCamo
Runs automatically on player at start in scenario, mission, campaign. Player is less visible and audible to AI based on factors such as stance, uniform, weather, light level, fog, rain, concealment in bushes, next to trees etc. The Dynamic Camo Effect is adjustable by the scenario maker and easily stopped /restarted with differing parameters. Includes debug mode to see the impact. Full details available using function viewer in game – tag BNC.
Basics: DynamicCamo runs automatically at start on player unit. Autorun doesn’t feature debug info though and isn’t adjustable. Its an out of the box effect.
To experiment with different settings or make your own mission with custom dynamicCamo levels stop the aurorunning DynamicCamo from debug console ( or trigger or waypoint) using command: terminate autoruncamo;
To run again on player or unit put this in init or a trigger or waypoint: dynamicCamo = [player, "debug", 0,1,0,1,5] spawn BNC_fnc_camoscript;
Then for example if you wanted to turn debug off and run with a greater camo effect you would use command; terminate dynamicCamo; dynamicCamo = [player, "",0,0.5,0,0,5,5] spawn BNC_fnc_camoscript;
You can stop and start the script at anytime using this approach of terminating the current instance then restarting with whatever parameters you require. Always terminate the current instance like this before running the script again on q unit with changed parameters. The Autorrun instance at startup is always named AutorunCamo. You can name later instances whatever you want but I suggest using the standard name DynamicCamo as I have done in the above example.
Note: while you shouldn’t run the effect more than once at the same time on a single unit you can have the effect running on more than one unit. Simply ensure you make each a distinct instance of the function. eg camoscript = [player, "", 0,1,0,1,5] spawn BNc_fnc_camoscript camoscriptBob = [Bob,"",0,1,0,1,5] spawn BNC_fnc_camoscript would have the script running both on player and a unit called Bob. You would then end the script on Bob using terminate camoscriptBob; – ie using the handle you used when you ran the script on Bob. You could if you wish run the script on every member of your squad this way. If this is not clear please leave a comment/question.
The script also impacts the ability of AI to see and hear each other if it is run on an AI.
The strength of the effect is adjustable see function viewer.
Also full details available at https://forums.bohemia.net/forums/topic/223202-release-dynamiccamo-script/
Important: To get the full benefit you should make sure to set your USER ACTION 1 to keys X and Z so that stance changes are picked up by the script and a recalculation of camo level is forced each time your stance changes.
Note: Ai will find you increasingly hard to spot once the camouflague values get down really significantly below 0.5 ( try in the editor with debug on and watch the values) but once you fire your gun I’m afraid they will spot you just as they normally do. So if you want to be stealthy resist the urge to pull the trigger. The AI ability to detect movement is also unaffected.
Explanation of parameters for calling the code:
[unit,"debug",CamLo,CamHi,AudLo,AudHi,Autodelay] spawn BNC_fnc_camoscript;
Unit – the unit you are setting dynamic camo on
"debug" if you want debug information about how many bushes etc the script has fond next to player and the camouflague and audible levels. Also reports an "East knows about" value. "" for no debug.
CamLo – sets the floor for the calculated camoflague. 0 is minimum. Set a bit higher if you want to make sure unit never gets more than a certain amount of camouflague.
CamHi —- sets the maximum value ( ie maximum visibility can reach) lower this below 1 to increase the effect.
AudLo and AudHi work the same way as for the camouflague effect
ie use lower values for CamHi to get a greater effect.
Autodelay sets how often the script automatically recalculates the camoflague level if you havent changed stance. I use 5 secs. If you have set User Key 1 to "X" and "Y" keys as advised script will also recalculate on change of stance.
Tip: Because the script also has an inbuilt delay (not just the autodelay) so if you bob up quickly from a lower stance you can keep the greater camo level for up to about 2 secs if I recall right. best way is to try this in editor with debug on and get a feel for it.
Revisions:
Old revisions of this mod are available below. Click the link to download.