IRONFRONT FANS FORUM
Register Latest Topics
 
 
 


Reply
  Author   Comment  
Santa Six

Avatar / Picture

Colonel
Registered:
Posts: 360
Reply with quote  #1 
This script makes any AAA fire into the sky in random directions. It works for background battle effects too. Make sure to place more then one AAA in not so close proximity to each other for best results. Enjoy!


Put this in the AAA's init line:
Code:
nul = [this, false] execVM "tracerfire.sqf"

To use as background effects change false to true. It'll hide the unit.

tracerfire.sqf
Code:
//Random Tracer Fire Script 1.0
//by Santa Six
//
//init line:
//nul = [this, false] execVM "tracerfire.sqf"
 
 
if (!isServer) exitWith {};
 
_unit = _this select 0;
_hide = _this select 1;
_startdir = getDir _unit;
_wait = (random 3) + 2;
_weapon = weapons _unit select 0;
 
(gunner _unit) disableAI "AUTOTARGET";
_unit hideObject _hide;
 
sleep _wait;
 
while {alive gunner _unit} do
{
_left = _startdir - (240/2);
_right = _startdir + (240/2);
 
if (_left > _right) then {_left = _startdir - (240/2); _right = _startdir + (240/2)};
 
_left = round _left;
_right = round _right;
 
_dir = random (_right - _left) + _left;
if (_dir < 0) then {_dir = _dir + 360}; 
 
_unit setVehicleAmmo 1;
_pos  = position _unit;
_pos = [(_pos select 0) + 50*sin _dir, (_pos select 1) + 50*cos _dir, 20 + (random 200)];
 
_unit doWatch _pos;
 
sleep _wait;
 
_unit fire _weapon;
sleep 0.2;
 _unit fire _weapon;
sleep 0.2;
_unit fire _weapon;
sleep 0.2;
 _unit fire _weapon;
sleep 0.2;
_unit fire _weapon;
sleep 0.2;
_unit fire _weapon;
sleep 0.2;
};
 
0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,749
Reply with quote  #2 
Now hosted on the MR:
http://www.missionrepository.com/IF-Scripts/Random%20Tracer%20fire%20script.zip
I built the script with armaedit, and then zipped it up with a readme, script can be found under scripts on the MR.

__________________
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 454
Reply with quote  #3 
Hey All! 

  Happy to report that this script works absolutely perfectly in A3 - Beautiful work Santa : -)

Cheers!

__________________
Mission Repository - http://www.missionrepository.com

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.