Jump to content
damotr

AC130 and question

Recommended Posts


Okay, it's next element of my maybe-someday-mod... and it works like this:

- Every AC-130H has virtual empty static gun that is fixed to plane's center-of-roll and is constantly machning plane's direction (minus 90 deg)
- Pilot or gunner may initiate script via "Enable combat mode" action. Gunner is then tranfered to this fixed gun.

- Gunner will return to his seat when "Disable combat mode" action is used.
- In case pilot is controlled by AI - rounding script is used

- Onboard "gun" player is only abe to use optics view - its due to very strange angles of camera in case of external or internal view.


Still WIP till I'll figure out how to make CAS script :/
And yeah - model needs polishing, but right now scripts are more important for me.

 

Model is modified FLK C130. I was unable to contact creators and ask for permission so here comes another thing: Would it be fair and enough to list all credits of models/textures/etc. in kick-ass-credits-cutscene? After so many years it's impossible to contact most of the people.

  • Like 4

Share this post


Link to post
Share on other sites
15 hours ago, damotr said:

Would it be fair and enough to list all credits of models/textures/etc. in kick-ass-credits-cutscene? After so many years it's impossible to contact most of the people.

It may be fair, but not enough to have it released on these forums without the fear of ban-hammer. Your best bet (if you can't model your own C-130) is to use BIS C-130J from Arma 2 (it is allowed to port BIS models from Armas to OFP/CWA).

  • Like 1

Share this post


Link to post
Share on other sites

Yeah... currently there is more that 3GB of models and textures that I used just for fun... but it turned out to be nicely combined and so here is an idea of releasing it.

And well... in most readmes there is "If you use something from this addon, please send me mail and give my name to CREDITS in your addon"... So I though it would be technically okay.

Share this post


Link to post
Share on other sites

Hi. At the moment ben9 works on a pack of C-130s so you can share and deal with it together. The only issue is a language barrier, but i'll be glad to help. 

In those announcements thread i told that AC-130 will be very nice if a gunner (or even his commander) will be a part of an observer's squad, so they will spot and report and a pilot will follow his own waypoints (over the battlefield), so it can patrol several spots. AC-130 basically is an artillery platform so observers needed to perform effectively.

Share this post


Link to post
Share on other sites

The more crew mans the gun - the more sqads will get CAS. Would you add a commander to gun and share the addon?

Can you make a "group" in the editor, so plane spawns with a few men, which then becomes a gunner and commander of the gun so they can be assigned to another squads and perform CAS?

Again: pilot follows his own waypoints and gunner with commander shares info of theyr squads as they are both in the same vehicle and even may have their own "destroy" WPs.

Share this post


Link to post
Share on other sites

I've a slightly different approach:

In case player has a radio (PRC77 or is inside vehicle with western radio) and is defined as FAC - he (or any other member of his group) will be able to call for CAS support. In case of AC-130 there will be following options:

- Set the center of rounding circle (Yeah... little note here: making line-attack eg. along the road with convoy is just pointless. Attacked convoy will stop, and in case of opening fire upon static objects this in enaugh - I know it's by-the-book and is used in real life but from my perspective and testing - in distances and AI if OFP just makes it useless)

- Type of marking for target (flare, smoke, laser)

- Type of weapon

- Number of rounds

 

So for CAS you don't need to be commander of plane - You need to be defined as FAC (like in my artillery script). Also - It will be impossible for more than one FAC to call the same aircraft for CAS (it would be complicated beyond usefulness)

 

If player is aboard Specter it probably means that it's MP mission - it such You don't need sophisticated scripting solution for commanding. I mean: You could have one, but currently I'm too busy with CAS script, and AC130 will be WIP until CAS is finished.

I'll be very happy to co-work with someone, but as I've mentioned - I'm working on Total Convertion Mod, and due to type of real-life work I'm not always avaliable. I will publish the scripts after CAS is finished.

Share this post


Link to post
Share on other sites

Sorry, i didn't get the nootification. Thanks for the answering and emprovements. Peronally i hate those fancy scripts, not familiar with. I can somehow understand how it's works, ingame and some code, anyway.
As for a model: I think that the weapon may be the "tank" class so it will has the GUN and maybe a machinegun (rotary - scripted or "naturally" animated). Bofors will be a part of a turret (a dull). Commander needed too.

Here's some C-130s already: http://www.flashpoint.ru/threads/Военно-транспортные-самолёты-ВВС-США-С-130.55501/

There may be more. Good Luck to you!

Share this post


Link to post
Share on other sites

Thanks!

 

There is a little problem in making gun rotating... and even shooting from certain point (like end of barrel :P )

 

It is possible to lock gun with plane - so it's constantly matching it's position and direction (-90 deg so it's portside) but no way of making it maching pitch or roll. Gun is 100% virtual. It has no model. Even end of barrel point is distant enough fron center of roll, so AI wont shoot itself in the wing :P

 

Guns on the model are just props. It's possible to show muzzle flash on them if virtual gun is firing M61... but... during night there is that huuuge flash that makes muzzle flash nearly unnoticable and during day... well... distance from plane and it's speed causes same thing...

 

Same thing with making those prop-guns movable. They are static and making them aiming in direction that virtual gun is aiming may be possible (but may not be, it would require calculating roll and pich of a plane) but script will be massive, CPU-consuming and effects probably won't be noticed by any player.

 

On the other hand - I may prepare simple script for guns movement just for cutscene purposes.

  • Like 1

Share this post


Link to post
Share on other sites

On the topic of attaching the virtual gun to the correct position - there is a dirty way of referencing memory points in OFP via particle arrays. It only works with models that aren't animated and it has to be executed on a frame by frame basis, so it would probably screw with the CPU.

The first component is a sqs or sqf using an array like this, referencing a named selection in the 3d model's memory LOD:

 

drop ["koulesvetlo", "", "Billboard", 0, 0, "memoryPointName", [0,0,0], 0, 1.275, 1, 0, [1], [[1,1,1,1]], [1], 0, 0, "", "\path\scriptDoingThePositioning.sqs", _unitWhithTheMemoryPoint];

Part two is a script which is called by the drop array:

 

 _pos = _this; // [x, y, z] position of the memory point.

... blah blah setPos

I'd only really advise using this for one-shot solutions, not constantly executed code.

 

But there's something I haven't tried out yet - while almost every command in OFP uses world space, maybe camSetRelPos could be used to make continuous evaluation of a certain position easier.

You could create a new camera via the plane's init script, assign the plane as the target, set the relative position to a value you know to be the right position of the gun barrel, then loop camSetRelPos and setPos the virtual gun to the camera object. There's probably a few downsides there, but it's just an idea.

 

 

Share this post


Link to post
Share on other sites

Yeah... but would it be worth it?

I mean... My goal is rather to make something effective than make it exactly as in real life. Virtual gun with "end of barrel" in certain distance from plane and playing little nasty bondage game via "getposASL-setposASL" is just easier, and from player point of view... well:

 

Weapons of AC130 (as far as I know, may be wrong here) are stabilized, so after getting exact pich and roll values it will be necessary to somehow smooth the gun movement - if not any change of roll will affect the targeting line. Aiming would become impossible. Current solution does not require this.

Edit:
One more thing: also if end of gun will be closer than now AI would shot itself in the wing. Tested. There is no option to lock the elevation limit of the gun to roll of the plane, so still - point where projectiles are created must be out-of-model if we want to use it with AI gunners.

  • Like 2

Share this post


Link to post
Share on other sites

Hi, any news on that topic? Idea sounds great.

Share this post


Link to post
Share on other sites

There were some... perturbations with my mod...

But I'm still working on functional CAS script. Since AI of aircrafts can't always get the idea of avenue of approach work is stuck in certain point :/

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

×