Jump to content
Sign in to follow this  
guziczek101

How to force AAA gun

Recommended Posts

Hi i have problem i'm trying to force Flakvierling (from reyhard WW2 mod) to shot invisible target on the sky (effect like on D-Day )

I have written my first script (I supported on one of the script from I44) but infantry is shotting to this dummy targets

Here is my script

_vehicle = _this select 0
_targetArray = [wal,wal_1,wal_2,wal_3,wal_4]
_number = Random count _targetArray
? ((_number mod 1) >= 0.5): _number = _number + 1
_number = _number - (_number mod 1)
_position = _targetArray select _number
_vehicle doTarget _position
~10
_vehicle doFire _position
exit

if someone could help me to change this script to don't need to use the dummy targets

wal, wal_1, wal_2... are the dummy target's

thanks

Share this post


Link to post
Share on other sites

hi,

Hi i have problem i'm trying to force Flakvierling (from reyhard WW2 mod) to shot invisible target on the sky (effect like on D-Day )

I have written my first script (I supported on one of the script from I44) but infantry is shotting to this dummy targets

Here is my script

_vehicle = _this select 0
_targetArray = [wal,wal_1,wal_2,wal_3,wal_4]
_number = Random count _targetArray
? ((_number mod 1) >= 0.5): _number = _number + 1
_number = _number - (_number mod 1)
_position = _targetArray select _number
_vehicle doTarget _position
~10
_vehicle doFire _position
exit

if someone could help me to change this script to don't need to use the dummy targets

wal, wal_1, wal_2... are the dummy target's

thanks

It is possible to don't use any addons.

Here's a script to do what you want. It works with any AA gun/armored addon gun included. I think it should work with statics like MG or mortar but I didn't tested.

init.sqs

nik_shilka=[EastShilka1,EastShilka2,EastShilka3,EastShilka4,EastShilka5,EastShilka6,EastShilka7,EastShilka8]
{[_x] exec "aa_fire.sqs"} forEach nik_shilka

exit

aa_fire.sqs

;********************************
;AA Fire Script by Nikiller v0.9b
;Force AA to fire in the sky
;contact: nikillerofp@hotmail.fr
;[unitName] exec "aa_fire.sqs"
;********************************

~1+random 3

_u = _this select 0

if (local _u) then {} else {goto "ende"}

_u setBehaviour "COMBAT"
_gunner=gunner _u
_m=(magazines (_u) select 0)
_d=0.3

#l
~_d
if ((alive _u) && (alive _gunner)) then {} else {goto "ende"}
_aim=getPos _u
_ax=_aim select 0
_ay=_aim select 1
_az=_aim select 2
_az=_az+15
_u doWatch [(_ax)-10+random 20,(_ay)-10+random 20,(_az)-5+random 5]
_u fire (weapons (_u) select 0)
if (someAmmo _u) then {goto "l"}

#add
~2
if (alive _u) then {_u removeMagazines _m; _u addMagazine _m; goto "l"}

#ende

exit

Here's a demo to show how it works.

DEMO LINK

cya.

Nikiller.

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  

×