I'm not sure if it's a right place to post it. It would better suit "Editing and scripting Ideas" board (there was one like that on OFPEC some time ago, wasn't it?).
Anyway I have a script which is not perfect but it suits its purpose quite good and I don't think I'll be able (because of skills and time) to develop any further but I think the idea and work done so far is worthy to be shared with the community.
The script is based on General Barron's beta script for OFP which for some unknown reason caused OFP to CTD. So AFAIK General Barron stopped working on it. But when ARMA came out I realised that the scrip works (with slight improvements) with the new game. So I started to add my little improvements (now the script is rather different than the General Barron's one) and now I don't think I'll be able to improve it any more (this really DOESN'T mean it can't be improved - I'm just not skilled enough). So I release it now so anyone can develop it further or just use it in mission in its current state.Purpose:
Script is used to semi-automaticly force some units to efectively use a cover. In its current state it can be used to quickly prepare some defence missions.Features:
- when the script is executed units automaticly search for suitable cover
- units know how to use the cover - they hide behind the cover and pop up from behind it to shootRoom for improvements
- rewrite the script to sqf
- add more general script which would automaticly decide when the units should take cover (and at which position and in which direction) and when they should leave the cover
- add suppressive fire script which would force units to search for cover and to increase the time they stay behind the cover and decrease the time for which they pop up from behind it
- add better handling of exceptions ie. which types of cover to ignore (for now there is a quite clumsy way of ruling out claseless visitor placed objects such as roads)
- better taking cover rutines for urban areas and woods
Anyone is free to copy, modify, print and burn at his fireplace those scripts. It would be nice though if he gave me some credit
(and to General Barron - as it is he who gave it a first try).Some technical remarks
- copy contents of "init.sqs" to your mission's init.sqs
- use [<unit>, <position>, <direction>, <radius>] exec "LEH_takeCoverIt.sqs" to execute the script. Fourth parameter is optional.Parameters:
unit - unit to take cover
position - position around which unit is to search for cover (eg. position <unit>)
direction - direction from which the cover shoud protect the unit
radius - (optional) - radius in which the unit should search for cover
Script uses some global variables (with LEH tag) initiated in "init.sqs".
Ok. Now after my too-long introduction you can try the two attached missions.