Jump to content
LurchiDerLurch

AC-130 Script for ARMA2 (0.3)

Recommended Posts

Another question,

I like the GBU12 as the "105MM" , but when you fire it zig zags all over the place, any solution? normal 105MM is weak in game, seen AC130 105MM for real and it really does some damage.

Thanks

Scott

Share this post


Link to post
Share on other sites
One thing I have noticed is if you have more than 2 people load into the C130 it breaks the script. The option will not return unless you destroy the C130. (not a big deal as I added it to the rewards for doing main missions)

Are you sure that nobody had the script activiated? :confused:

2) How do you get the AI AC130 to fire other than 25MM. I can't get it to fire 40MM and 105MM at targets. I even placed tanks and it will not fire above 25MM, any solution?

So far it's just random. For infantry it always uses the 25mm. For vehicles it's random which of the 3 weapons it uses.

I like the GBU12 as the "105MM" , but when you fire it zig zags all over the place, any solution? normal 105MM is weak in game, seen AC130 105MM for real and it really does some damage.

the gbu12 is not a shell. So the "velocity" won't work with that. It can't be accelerated...

However I've managed to create my own shells. But the disadvantage is that it's an add on... so if you want the big explosions back, you will have to install the add on :)

Lurchi

Share this post


Link to post
Share on other sites

how do i implement this in my own mission? do i copy all the files from the sample mission folder into my own? im having problems with this

Share this post


Link to post
Share on other sites

Yes, you copy everything from the example mission folder, with the exception of the mission file. If you already have a init.sqf or description.ext file than simply add the lines of code that is in the example mission files to those already in your mission. You will need to then insert a C-130, laptop, or however you choose to use the AC-130 scripts in your mission.

Share this post


Link to post
Share on other sites

No it was on a closed server and everyone was on coms. After we made everyone get out it still did not work.

Also found that it stoped working after about an hour in domination with just one person flying it. This might be the way I added it to the map so I will go over the setup again.

Share this post


Link to post
Share on other sites

Lurch, it would be nice if you could program the "A.I." aspect of it to count the number of soldiers in any enemy infantry group it notices. If the number is large and the C130 still has over 1/2 of its supply of the larger ammo types, it could use those instead of the 25mm.

Have the A.I. target the leader, who is usually at the center of the group. That should take out a large number of the group's members.

Any chance you can convince the AC130 to target buildings into which the enemy has gone? :D

Share this post


Link to post
Share on other sites

First, thx for the great work.

I set up some missions with the AC130, but it always uses the 25mm gun. It doesn't matter if the target is a tank or something else. There was no random use of big guns...

Share this post


Link to post
Share on other sites

Hello,

very nice addon. Having great fun with it. But, I don't quite understand why the different guns have different zooms.

According to the most prominent AC-130 video on YT (the one with "the square building is the mosque!!! Don't engage") even when using the 105mm cannon, the gunner can use any zoom level.

Share this post


Link to post
Share on other sites

Hi.

First of all thanks for a great script. I have some issues (I'm not good at coding):

1.) Does anyone know how to initialize the script so that NVG are defaulted (and then turn off FLIR)

2.) No troops showing by default

3.) How to make the grey version of NVG.

4.) And finally how to make the spawned (map clicked) AC-130 to be ignored by enemy AI, like if is possible to insert a setCaptive true command somewhere in the script.

I got all this sorted out in the previous version of the script, but it is a little too complicated for my skills atm.

Any help would be appreciated.

Share this post


Link to post
Share on other sites
First, thx for the great work.

I set up some missions with the AC130, but it always uses the 25mm gun. It doesn't matter if the target is a tank or something else. There was no random use of big guns...

Oh you're right... I have no idea at which point I changed the script. The AC130 is using every gun in the video... hm

If you want to fix this by your own:

Go into the ac130_AI_shooting.sqf located in the "AI" folder.

Replace this line:

[LDL_guns_dirh,LDL_guns_dirv,0,_logic]call _shoot;

with this line:

[LDL_guns_dirh,LDL_guns_dirv,_num,_logic]call _shoot;

The same line appears at the bottom again. Don't replace this line. It's for the light targets (so it uses 25mm all the time).

I didn't test it (very busy at the moment :( ) but it should work.

Thanks for figuring this out.

Salah ad Din;1650653']

very nice addon. Having great fun with it. But' date=' I don't quite understand why the different guns have different zooms.

[/quote']

Due to balance. The AC130 would be too powerful and it's supposed to be more difficult to shoot. ;)

Hi.

First of all thanks for a great script. I have some issues (I'm not good at coding):

1.) Does anyone know how to initialize the script so that NVG are defaulted (and then turn off FLIR)

2.) No troops showing by default

3.) How to make the grey version of NVG.

4.) And finally how to make the spawned (map clicked) AC-130 to be ignored by enemy AI, like if is possible to insert a setCaptive true command somewhere in the script.

1) 2): The folders Attach and Rotate have ac130_*_setup scripts.

You can change some parameter in it.

I'll make it easier to change them in the next version.

3): Search for this line in the setup script:

_typeOfNVG = 0;

4: Strange... usally the AI ignores it and I don't know why ^^

You could place this line:

LDL_ac130_plane setCaptive true;

at the bottom of the ac130_rot_setup.sqf located in the Rotate folder.

Lurchi

Share this post


Link to post
Share on other sites

Lurchi, excellent script! Going to be very fun to use in a night mission and watch it pick apart the enemy. :)

I saw it was asked prior to v0.2, but is the mouse pointer supposed to show in the camera and is it possible to hide it?

Share this post


Link to post
Share on other sites

I don't know how to disable the cursor in a dialog...

Edited by LurchiDerLurch

Share this post


Link to post
Share on other sites

I did some looking, it seems no one has figured that one out... Mando missiles is a similar cam script and it has the cursor too. :( Hopefully BI will fix/add a way to control that in arrowhead.

Ran into a slight snag with a vehicle respawn script in domination... When the vehicle respawns LDL_ac130_plane getVariable "LDL_planeInUse" returns null instead of false/true which causes ac130_action_pilot/copilot.sqfs to end at the If statement. Using the debugger I was able to setvariable this to false and the sensor operator camera works again afterwards.

I'm still kind of new to this and I'm having a hard time figuring out how to get an If to check is that is null and set to false if it is...

Edited by LVSOCOM

Share this post


Link to post
Share on other sites

Thaks for the reply Lurch.

The grey NVG doesn't seem to work thought, I've tried the:

3): Search for this line in the setup script:

Code:

_typeOfNVG = 0:

in the setup file in both the rotate and attach folders, but it just makes the NVG unselectable. That makes me think that there may be a small typing error somewhere in the script that's supposed to call for the grey NVG?

Concerning the:

LDL_ac130_plane setCaptive true;

I'm not sure it helps... Still got the odd thing targeting me, are there any other places this should be inserted?

By the way, yes, it is strange that the AI really seem to have trouble coming to terms with the A-130 as it sometimes ignores it, other times fires.

If it helps, I have noticed that when you start in the aircraft and uses the option "AC-130 camera" the plane gets targeted but is invulnerable as long as you stay in cam mode.

If you map-click the AC-130 into position the AI are having great difficulty detecting the plane, but sometimes fires though. This doesn't seem to harm the plane, though... No missiles btw, only AAA fire from eg. Shilkas.

Edited by malkekoen
Spelling

Share this post


Link to post
Share on other sites

Ran into a slight snag with a vehicle respawn script in domination... When the vehicle respawns LDL_ac130_plane getVariable "LDL_planeInUse" returns null instead of false/true which causes ac130_action_pilot/copilot.sqfs to end at the If statement. Using the debugger I was able to setvariable this to false and the sensor operator camera works again afterwards.

Every C130-J must execute this line:

nameOfC130J setVariable ["LDL_planeInUse", false, true];

Thaks for the reply Lurch.

The grey NVG doesn't seem to work thought, I've tried the:

in the setup file in both the rotate and attach folders, but it just makes the NVG unselectable. That makes me think that there may be a small typing error somewhere in the script that's supposed to call for the grey NVG?

I found the problem. It's "[]call LDL_setCamAperture;" instead of "[]call setCamAperture;"

Thank you. ;)

Maybe I'll release an update with all these bugfixes. ;)

There's also an add-on version in the works.

Last but not least I'm waiting for Operation Arrowhead and its FLIR. :p

Lurchi

Share this post


Link to post
Share on other sites

Pure awesomeness!

I experience insane camera jerking and lagging when using ACE-mod (Because the actual airplane doesn't have same dimensions I presume [Camera is in different position, for example]). Any chances to get ACE-compatible version? And if it is not too much to ask a simple way to disable hud/3rd person view. They are killing the immersion.

Share this post


Link to post
Share on other sites
Pure awesomeness!

I experience insane camera jerking and lagging when using ACE-mod (Because the actual airplane doesn't have same dimensions I presume [Camera is in different position, for example]). Any chances to get ACE-compatible version? And if it is not too much to ask a simple way to disable hud/3rd person view. They are killing the immersion.

Is it in MP? If someone else is flys the AC130 and you're the gunner the camera shakes because planes don't fly stable...

I have no problems with ACE in SP.

Share this post


Link to post
Share on other sites
Is it in MP? If someone else is flys the AC130 and you're the gunner the camera shakes because planes don't fly stable...

I have no problems with ACE in SP.

Tried it in multiplayer without any mods and no shaking at all. I try to figure it out what is causing it...

Share this post


Link to post
Share on other sites

We had the same problem in version 0.1. But then I optimized the script and it worked with ACE... :/

Try to turn down your graphics. Maybe the script is just too complex for your hardware?

Share this post


Link to post
Share on other sites

Odd... Now it is working perfectly with and without ACE. Mysterious are the ways of computers...

Share this post


Link to post
Share on other sites

I have been having some troubles using your cool script in a mission, explained further in this thread: http://forums.bistudio.com/showthread.php?t=100469

In short, it is concerning the behaviour of AI targeting. We have all noticed that the AC-130 itself, when in cam mode is all but invincible (AI not targeting properly/not causing damage) and it seems the problem extents to even AI engaging on the ground:

http://www.youtube.com/watch?v=e_i1bj2FiqM

I have been doing some testing along with F2k Sel and it seems the problems are related to the script somehow. I know it's probably a BIS bug somewhere, but please, do you have any advice or idea what is going on?

Share this post


Link to post
Share on other sites

So I am hoping there will be a new update to include proper FLIR for those of us that have operation arrowhead?:)

Share this post


Link to post
Share on other sites

We will have to take a look how the FLIR is implemented... as far as I know it's attached to a weapon... my script is NOT a weapon... So it's difficult to implement the FLIR into a dialog...

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

×