Jump to content
Tiberius_161

Script release: Counter Battery Fire (physical guns)

Recommended Posts

Hi all,

 

This is the first version of a simple CBF (counter battery fire) script. It is designed to make the artillery or mortar role more challenging by adding a threat. 
When you fire your artillery piece/ mortar, there is a chance of enemy fire support shooting at the location where you fired from. 

 

Package contains: 

1) Example mission;

2) Script folder;

3) initserver.sqf file;

 

Usage:

  1. Have a mission available or save a new mission to create the mission folder; 
  2. In the editor, place down any object and call it "Tib_CBF_radar" (this object will serve as a radar to detect artillery shots);
  3. In the editor,  place down enemy artillery or mortar units and name them (keep their minimum and maximum range in mind when placing them);
  4. In the editor,  place down a own/friendly artillery piece or mortar and add the following code in the unit's init
    this addEventHandler ["Fired", {null = [_this select 0, _this select 1] execVM "TibCBF\cbf.sqf"}];

    Copy the "TibCBF" folder into your own mission folder;

  5. Copy the "initserver.sqf" file into your mission folder, or copy the content from that file into your own initserver.sqf;
  6. In the "initserver.sqf" file, put the name of the enemy guns in the "TibCBF_nmyGunList = [];" array.
  7. In the "initserver.sqf" file, set up your preferences as desired. Comments on the functions are provided.   

 

Spoiler

TibCBF_CooldownTime = 0;                         //Cooldown before nmy gun can give CBF. You can give any value
TibCBF_Chance = 0;                                      //The chance per shot that CBF will be initiated. Maximum 100;
TibCBF_nmyGunList = [];                              //The list of nmy guns that may provide CBF;
TibCBF_responseTime = 0;                          //the Time it takes before nmy gun begins to fire
TibCBF_ArtyRounds = 0;                              //Script will take five rounds, so value here will be added to that .   
TibCBF_ArtySpread = 0;                               //The amount of randomized spread between each round
TibCBF_InfiniteAmmo = true;                      //Update enemy ammostock after CBF
TibCBF_ShootandScoot = true;                  //Enemy guns will move to a new position when CB fire mission is completed.

 

Media:

CBF Script youtube video

 

Download link:

https://www.mediafire.com/folder/3ggseg2tleivx/

 

The folder is inside the example mission. 

 

Required mods:

None

 

You are free to use this and expand on this script, as long as you give credits ;). I hope it has some use for people!

 

Cheers

Tiberius

  • Like 3
  • Thanks 1

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

×