Author: Inkompetent
Author Website:

Requirements: No addons required

Version: 1.1 beta

Short description:

Date: 2009-08-14 20:44


Comments: (0)
Rating:



 





INKO Simple Firing Script
by
Inkompetent


Description:
INKO_SFS.SQF (Simple Firing Script) is designed for script-controlled fire sequences from one or more units towards the area of a specific target. Either to be used just for fixed or pre-planned fires, or just as cosmetica with anti air batteries firing into the air, etc.

It is to be an all-around script that is as easy as possible to use while being as versatile as possible for the mission-maker, functioning for any kind of fires that the mission designer would want to control through script. Instead of making multiple scripts for different units depending on what and how they fire I have intended this as a one-solution-for-all time-saver.


Features:
The script allows for the mission designer to choose what vehicle(s) are to fire, what the target (or reference point) is, in what radius around that target they should fire, and at what altitude relative to the target they should aim. In addition to that one can choose if the firing sequence should be done just once, multiple times, or infinitely, and what the delay in seconds should be between both each burst shot within a sequence, and between each repetition of the sequence. It is now also possible to decide with which muzzle the unit(s) should fire.


Installation:
Simply copy the script to the wanted mission folder in "My Documents/ArmA2/missions".


Usage:
The script requires a number of parameters when executed to achieve the desired effect. ALL VARIABLES MUST BE ENTERED!
All you need is one or more units to do the firing, and then either a marker, trigger, object or unit as reference point for the shooting.

Call with:
nul=[[obj/group array],string/obj name,[int,int],bool,[int,int],[int,int,int],int] execVM "inko_sfs.sqf";
nul=[[Firing unit(s) name(s)],"target name"/target name,[radius,altitude],refill?,[bursts per salvo,pause between burst],[repetitions,intervalmin,intervalmax],weapon/muzzle] execVM "inko_sfs.sqf";

Example:
nul=[[shilka1,shilka2],"shilkaTarget1",[150,100],true,[3,1],[1,0,0],0] execVM "inko_sfs.sqf";
Above example means shilka1 and shilka2 will shoot at the marker shilkaTarget1 within a 150m radius and at 100m above sea level, regain lost ammunition, fire three bursts with one second between every burst, regain lost ammunition, only do this sequence once, and fire with it's primary muzzle.
Note that target should only have quotation marks around it if it is a marker. If it is an object it should not.
Also note that the main weapon of a vehicle has the index '0'.

If using an endless fire sequence (repetitions=0), make sure to name the script handle something else than "nul", for example fire1=[....] execVM "inko_sfs.sqf". This way you can stop the script when you want to with the 'terminate'-command.

Note that even for a single salvo you must enter a number for intervalmin and intervalmax!


Future plans:
Make the delay more directly dependant on the weapon's reload speed/rate of fire.
Create ability to fire longer salvos with automatic weapons.
Dynamic (as much as possible) parameter array, making it more user friendly.


Known issues:
At the moment mostly suitable for burst-firing weapons.
Very limited burst length.
Not suitable for units where you want to mix the muzzle used.


Credits:
Written by Inkompetent. Inspired by SUPR3ME KILL3R's flak.sqs script that was released on the BIS forums.


Changelog:
v1.1 Beta (2009-08-12)
- Added possibilty to use groups as well as units simultanously as parameter. -- Added choice of muzzle. Added additional variables to decide number of bursts/shots per salvo and the delay in between,

v1.0 Beta (2009-07-29)
- First release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags