Jump to content
Sign in to follow this  
DaveP

AttachTo and you -AC130 Gunship Simulation and More!

Recommended Posts

If you use deleteCollection on the gun, it'll turn invisible on the client the code is executed on, but will still be able to fire normally. It will have physics collisions/damage, but will not be able to be harmed by enemy fire. This will make the simulation look less wonky.

You can use the getPitchBank and setPitchBank functions that are included with arma2 on the guns to get them to point in the direction you want.

Have fun...

Share this post


Link to post
Share on other sites

I just came up with an design document solution for the AC-130H Pave Spectre II while in discussion with Zipper5 on IRC. To make the AC-130 a feasible product, you need three things:

1. A properly modeled AC-130, without the guns!

2. The guns, modeled as a single weapon object.

3. New ammunition types.

Breaking it down

Creating the AC-130 Model

You need to model it after the AC-130H Pave Spectre II, not the AC-130J Spooky. This means only two gun portholes, one for the 40mm Bofors, and one for the 105mm m102. You would also want to be mindful about the collision mesh - make sure you have a large collision mesh hole where the guns will be mounted in order to prevent any potential problems from cropping up.

ALTERNATIVE SOLUTION for AC-130: Use the C-130J that's already ingame, simply retexture it so that the gun portholes are textured onto the side.

Creating the Guns

You need to model the guns accurately after the 40mm L60 Bofors, and the 105mm M102, and position them in the mesh so that they will "snap" into the AC-130 model that has been fabricated beforehand. They will be attached to the AC-130 using the AttachTo scripting command.

ALTERNATIVE SOLUTION: Make the guns have no collision mesh whatsoever, and use the AttachTo command to position them properly where the textured gun portholes are on the C-130J retexture.

Making the Ammunition

You would need to create new ammunition for these guns, and they would have to be of a variety of types, as well as have a specific ballistic property that arbitrarily ignores the conventional trajectory deviation that is commonly applied to ballistics. (In other words, it has to be capable of staying laser-straight when fired.)

Ammunition Types for the L60: HE, Flechette, Incendiary, Illumination

Ammunition Types for the M102: HE, HEAT, Illumination, Incendiary, APFSDS?

The Implementation

To put this together properly, you'd be able to take advantage of the attachTo scripting command, to ensure that the guns are properly positioned, as well as vectored. This is very important that the aircraft model is properly prepared so that it does not collide with the gun model. Make sure the 40mm and the M102 howitzer are part of the same gun model, not separate, so that when they are moved around by the gunner, it moves in unison. The rest, I leave to you, Modders! This is your official game design document!

-NK

Edit: I've added an alternative solution to the first two steps of the game design document. I strongly recommend looking into that, since it is a MUCH less time-intensive procedure.

Edited by NKato

Share this post


Link to post
Share on other sites
If you use deleteCollection on the gun, it'll turn invisible on the client the code is executed on, but will still be able to fire normally. It will have physics collisions/damage, but will not be able to be harmed by enemy fire. This will make the simulation look less wonky.

You can use the getPitchBank and setPitchBank functions that are included with arma2 on the guns to get them to point in the direction you want.

Have fun...

Good idea, but when the plane banks, the guns overpitch, and any AI gunners hop out and the gun isn't fireable

Updated my example mission, plane's fitted with deleteCollection'ed gun and TOW launcher; just call it in to the mission area using the higher command interface and watch it blow stuff up :yay:

http://www.sendspace.com/file/jvsd7d

Share this post


Link to post
Share on other sites
Good idea, but when the plane banks, the guns overpitch, and any AI gunners hop out and the gun isn't fireable

Updated my example mission, plane's fitted with deleteCollection'ed gun and TOW launcher; just call it in to the mission area using the higher command interface and watch it blow stuff up :yay:

http://www.sendspace.com/file/jvsd7d

Gentlemen, the perfect AC130 is born. Thank you so much for this, it's pretty much perfect :yay:

EDIT: Note: It fires much more frequently and successfully when it orbits a little further away

Edited by DaRat

Share this post


Link to post
Share on other sites
Gentlemen, the perfect AC130 is born.

Needs a way to target infantry first :p Right now all it'll do is shoot cars/boats/armor, and trying to fit a machinegun yields no results. Perhaps making one of the heli miniguns into a static turret?

Share this post


Link to post
Share on other sites
Needs a way to target infantry first :p Right now all it'll do is shoot cars/boats/armor, and trying to fit a machinegun yields no results. Perhaps making one of the heli miniguns into a static turret?

Are unit engagement ranges hardcoded? Maybe trying an M2 at first with an edited spotting and firing range would do the trick?

Share this post


Link to post
Share on other sites
Are unit engagement ranges hardcoded? Maybe trying an M2 at first with an edited spotting and firing range would do the trick?

Must be, either that or just having trouble aiming within the limited field/range allowed, works fine when put in a heli

Share this post


Link to post
Share on other sites

It will probably have trouble engaging infantry because the AI has a hard time seeing them from that range? Might need to config a new static weapon where the AI has better spotting ability, to simulate the optics that they would have on the AC-130.

Share this post


Link to post
Share on other sites
It will probably have trouble engaging infantry because the AI has a hard time seeing them from that range? Might need to config a new static weapon where the AI has better spotting ability, to simulate the optics that they would have on the AC-130.

Having come back to this, I tried grouping the plane up with a guy on the ground; It worked great and the AC130 started firing at the infantry on the ground with its guns.. MG still no luck, though. Even tried attaching a tank to the thing and it didn't work.

Need a script to pass on the revealed units from one unit to another; I remember using one in OFP at one point; They just can't see the men from that high up

Share this post


Link to post
Share on other sites

Fantastic work gents!!!!!

The angels on our shoulders......

ac-130-deploying-flares.jpg

The smoke actually looks like an angel too lmao!

:D

Share this post


Link to post
Share on other sites

Not sure if anybody has permission to try this, maybe someone could get in contact with the talented script Mando and ask if he's got any plans to port it to ArmA II, he's already made a gun suite to go alongside his missile suite, it had definable weapons, I've unoffically tested it (without permission and thus will never be released), and it seemed to work ok!, the guns engaged the infantry (kind of, its not really them firing per sey but it gives the intended effect)

Share this post


Link to post
Share on other sites

Hehe, I'm sure Mandoble will import his scripts including the missle suite in ArmA2. We may have ourselves the AC130U Spectres gentlemen!

Share this post


Link to post
Share on other sites

Hey guys, new here :P

Just wondering, has any body else, besides me, had a problem with the sharp turns the ac130 AI makes? it jolts the gun view up and makes me lose sight of the target.

I love the whole ac130 gunship mod but i would love it if someone could make a script/command that made the ac130 turn at a given radius, smoothly around one point (the enemy).

I've been trying to find some script for ages now for the ac130 but also for the UAV.

Any help would be much apreciated

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  

×