Jump to content
Sign in to follow this  
Inkompetent

INKO Simple Firing Script

Recommended Posts

PURPOSE:

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.

KNOWN LIMITATIONS:

  • 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.

FUTURE

Planned additions are as follows:

  • 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.

VERSIONS:

  • 1.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,
  • 1.0 Beta (2009-07-29): First release

DOWNLOAD: Fetch it here

CREDITS:

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

SCRIPT INSTRUCTIONS

/* ==========================================
=    INKOMPETENT'S SIMPLE FIRING SCRIPT     =
=                  1.1 BETA                 =
=============================================

PURPOSE:
The script is designed to let the mission maker control and simulate fire from any unit on the battlefield.
It is mainly designed with AAA fire as that from ZSU-23/4 Shilkas or alike in mind, but can be used for practically any PRIMARY WEAPON in the game. This makes it unsuitable for firing with for example coaxial machineguns on AFVs and tanks, without modifying the script.

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!


Thanks to SUPR3ME KILL3R for his flak-script, giving me the inspiration to make this.
========================================== */

Share this post


Link to post
Share on other sites

I'm trying to get my firing unit to fire in full automatic bursts. I've been tinkering with the values in the trigger init and the script .sqs and have only managed to get the unit to fire in successive semi automatic shots. Also I cant seem to make a unit fire at one particular spot with no deviation. Any help would be awesome.

Share this post


Link to post
Share on other sites
I'm trying to get my firing unit to fire in full automatic bursts. I've been tinkering with the values in the trigger init and the script .sqs and have only managed to get the unit to fire in successive semi automatic shots. Also I cant seem to make a unit fire at one particular spot with no deviation. Any help would be awesome.

A few things may help.

Tested firing at a static helicopter flying called shilkaTarget1

call with

nul=[[shilka1],shilkaTarget1,[0,1],true,[1,0],[0,0,0],0] execVM "inko_sfs.sqf";

int the script you will need to make a few changes.

change the next line to the following line

replace

_mod = random 0.5;

with

_ mod = 0 ;// random 0.5;

replace

{_x fire (weapons _x select _weapon); sleep _mod} forEach _units;

with (this will only work with OA)

{_x action ["useWeapon",_x,_x turretUnit [0],_weapon];sleep _mod} forEach _units;

Share this post


Link to post
Share on other sites

Sorry to drag this thread up but i have a a query i hope someone can help me with....

Currently with the script you can define multiple vehicles in the array to engage a certain target.

Now what if i really want a seperate target for each vehicle? What would be the most effeceint way of calling the script... Will it hurt performance to call multiple instances of the script as below for example.

ZUAlpha=[[ZUAlpha],TargetAlpha,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";ZUBravo=[[ZUBravo],TargetBravo,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";ZUCharlie=[[ZUCharlie],TargetCharlie,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";ZUDelta=[[ZUDelta],TargetDelta,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";ZUEcho=[[ZUEcho],TargetEcho,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";ZUFoxtrot=[[ZUFoxtrot],TargetFoxtrot,[200,500],true,[3,0.2],[0,0,0],0] execVM "scripts\inko_sfs.sqf";

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×