Jump to content
LurchiDerLurch

AC-130 Script for ARMA2 (0.3)

Recommended Posts

How do i change the delay thingy?

I want the delay to be like 10 seconds or something, how?

Share this post


Link to post
Share on other sites
How do i change the delay thingy?

I want the delay to be like 10 seconds or something, how?

what are you talking about? you're simply not high enough! the engine already supports delay, you just need to far away enough!

Share this post


Link to post
Share on other sites
what are you talking about? you're simply not high enough! the engine already automatically supports delay if you're far away enough!

He probably ment the amount of time you have to wait before you can use the C-130.

It's in the readme

Share this post


Link to post
Share on other sites
what are you talking about? you're simply not high enough! the engine already supports delay, you just need to far away enough!

I meant the time it takes for the AC-130 to arrive, sorry for upsetting you!:butbut:

He probably ment the amount of time you have to wait before you can use the C-130.

It's in the readme

But how do i change it?

Should i make a new .sqf called "init" and should i write this in it:

waitUntil {!isNil "LDL_initDone"};
waitUntil {LDL_initDone};
//Options for the AC-130 (optional)
LDL_options =
[
1000, //0: Default radius for the rotating AC130. Default: 1000
1000, //1: Default height for the rotating AC130. Default: 1000
1000, //2: Munition for the 25mm. Default: 1000
50, //3: Munition for the 40mm. Default: 50
20, //4: Munition for the 105mm. Default: 20
true, //5: Show Infantry Strobes at startup. Default: true
false, //6: Show Vehicle Detection at startup. Default: false
false, //7: Activate 360° view. Default: false
false, //8: Show waypoints for rotating AC130. Default: false
true, //9: Show particles (smoke, tracer etc.); Default: true
9.5, //10: Maximum zoom level for the 25mm. Default: 9.5 (only numbers between 1 and 10)
9, //11: Maximum zoom level for the 40mm. Default: 9 (only numbers between 1 and 10)
8, //12: Maximum zoom level for the 105mm. Default: 8 (only numbers between 1 and 10)
-1, //13: Time in seconds when AC130 script stops. Default: -1 (infinite)
180, //14: Time in seconds the AI controlled AC130 stays in the air. Default: 180
true, //15: Disable Vehicle Detection (Enemy and friendly units). Default: true
false, //16: Disable Infantry Strobes. Default: false
false, //17: Disable Monitor. Default: false
false, //18: Disable third-person view. Default: false
1, //19: Camera effect at startup: 1 (Nothing), 2 (FLIR white), 3 (FLIR black), 4 (NVG). Default: 1
120, //20: Delay for mapclick AC130 to arrive. Default: 120
true, //21: Sequence at startup. Default: true
3, //22: Available AC130 mapclicks per player. Default: 3
false, //23: Disable Sounds. Default: false
false //24: Enable Optical Zoom. Default: false !BETA only available for rotating AC130 BETA!
];

And what should i change :

120, //20: Delay for mapclick AC130 to arrive. Default: 120

To?

Share this post


Link to post
Share on other sites
I meant the time it takes for the AC-130 to arrive, sorry for upsetting you!:butbut:

But how do i change it?

Should i make a new .sqf called "init" and should i write this in it:

waitUntil {!isNil "LDL_initDone"};
waitUntil {LDL_initDone};
//Options for the AC-130 (optional)
LDL_options =
[
1000, //0: Default radius for the rotating AC130. Default: 1000
1000, //1: Default height for the rotating AC130. Default: 1000
1000, //2: Munition for the 25mm. Default: 1000
50, //3: Munition for the 40mm. Default: 50
20, //4: Munition for the 105mm. Default: 20
true, //5: Show Infantry Strobes at startup. Default: true
false, //6: Show Vehicle Detection at startup. Default: false
false, //7: Activate 360° view. Default: false
false, //8: Show waypoints for rotating AC130. Default: false
true, //9: Show particles (smoke, tracer etc.); Default: true
9.5, //10: Maximum zoom level for the 25mm. Default: 9.5 (only numbers between 1 and 10)
9, //11: Maximum zoom level for the 40mm. Default: 9 (only numbers between 1 and 10)
8, //12: Maximum zoom level for the 105mm. Default: 8 (only numbers between 1 and 10)
-1, //13: Time in seconds when AC130 script stops. Default: -1 (infinite)
180, //14: Time in seconds the AI controlled AC130 stays in the air. Default: 180
true, //15: Disable Vehicle Detection (Enemy and friendly units). Default: true
false, //16: Disable Infantry Strobes. Default: false
false, //17: Disable Monitor. Default: false
false, //18: Disable third-person view. Default: false
1, //19: Camera effect at startup: 1 (Nothing), 2 (FLIR white), 3 (FLIR black), 4 (NVG). Default: 1
120, //20: Delay for mapclick AC130 to arrive. Default: 120
true, //21: Sequence at startup. Default: true
3, //22: Available AC130 mapclicks per player. Default: 3
false, //23: Disable Sounds. Default: false
false //24: Enable Optical Zoom. Default: false !BETA only available for rotating AC130 BETA!
];

And what should i change :

120, //20: Delay for mapclick AC130 to arrive. Default: 120

To?

I guess so..never actually used it.

Try to experiment and let us know how you're doing.

Share this post


Link to post
Share on other sites
I guess so..never actually used it.

Try to experiment and let us know how you're doing.

Hmm.. i tried that.. nothing happened.

Share this post


Link to post
Share on other sites
I meant the time it takes for the AC-130 to arrive, sorry for upsetting you!:butbut:

I apologize, i just clicked on the last page, and i just assumed, as ive seen the question i thought you asked so many times!

Sorry

Share this post


Link to post
Share on other sites
Hmm.. i tried that.. nothing happened.

Have you read this in the readme?

Maybe you didn't do that?

"Note: The following instruction contains codes (either for a script file or only for the init-line of an object in the editor). 
Every code here is written between [code] and a [/code]
 ([code]...here would be a code...[/code]
) to avoid mistakes.

Remeber to leave out the "[code]...[/code]
" if you copy the code into your file/editor."

Share this post


Link to post
Share on other sites

Feels like i've tried everything, can someone give me a guide or something? Would be much appreciated!

Share this post


Link to post
Share on other sites
Feels like i've tried everything, can someone give me a guide or something? Would be much appreciated!

What did you try in detail?

Addon version or just the Script version?

If you use an exampe mission there's always a init.sqf in the mission folder and the options-part is already written in. Just change the values there.

If no init.sqf exists in the mission folder (however if you use the script version there should be a init.sqf where the AC130 script is initializied) you have to create it by your own (create a textdocument and change the .txt to .sqf).

Follow the readme and implement the code as explained.

The 120 value stands for seconds.

Share this post


Link to post
Share on other sites

If you save a mission in the editor, a mission folder should appear in Documents\Arma2\missions

Create the init.sqf in this mission folder (name of the folder is your mission name from the editor)

and put this code in it:

waitUntil {!isNil "LDL_initDone"};

waitUntil {LDL_initDone};

//Options for the AC-130 (optional)

LDL_options =

[

1000, //0: Default radius for the rotating AC130. Default: 1000

1000, //1: Default height for the rotating AC130. Default: 1000

1000, //2: Munition for the 25mm. Default: 1000

50, //3: Munition for the 40mm. Default: 50

20, //4: Munition for the 105mm. Default: 20

true, //5: Show Infantry Strobes at startup. Default: true

false, //6: Show Vehicle Detection at startup. Default: false

false, //7: Activate 360° view. Default: false

false, //8: Show waypoints for rotating AC130. Default: false

true, //9: Show particles (smoke, tracer etc.); Default: true

9.5, //10: Maximum zoom level for the 25mm. Default: 9.5 (only numbers between 1 and 10)

9, //11: Maximum zoom level for the 40mm. Default: 9 (only numbers between 1 and 10)

8, //12: Maximum zoom level for the 105mm. Default: 8 (only numbers between 1 and 10)

-1, //13: Time in seconds when AC130 script stops. Default: -1 (infinite)

180, //14: Time in seconds the AI controlled AC130 stays in the air. Default: 180

true, //15: Disable Vehicle Detection (Enemy and friendly units). Default: true

false, //16: Disable Infantry Strobes. Default: false

false, //17: Disable Monitor. Default: false

false, //18: Disable third-person view. Default: false

1, //19: Camera effect at startup: 1 (Nothing), 2 (FLIR white), 3 (FLIR black), 4 (NVG). Default: 1

120, //20: Delay for mapclick AC130 to arrive. Default: 120

true, //21: Sequence at startup. Default: true

3, //22: Available AC130 mapclicks per player. Default: 3

false, //23: Disable Sounds. Default: false

false //24: Enable Optical Zoom. Default: false !BETA only available for rotating AC130 BETA!

];

Save it and enjoy ;)

PS: Of course you must change the values... f.e this line

120, //20: Delay for mapclick AC130 to arrive. Default: 120

change it to

10, //20: Delay for mapclick AC130 to arrive. Default: 120

And the AC130 will appear in 10 seconds

Share this post


Link to post
Share on other sites

Oh my god! Thank you SO MUCH! :D

Now it works fine!

I've been trying to figure this out ever since i got home from work! It's been like 7 hours now ( I live in Sweden )

This is the most awesome mod ever!

One question, would it be possible to do something similar with an Apache heli? That would be great!

Share this post


Link to post
Share on other sites

You know this mod really is awesome!

I like the AC130 & the UAV, but could you add an Apache to the option as well? (Apaches fly in circles around their targets too in CAS role, pretty much like the AC130.

Share this post


Link to post
Share on other sites

Apache flying around like the AC130 would look weird ^^

But in theory it's possible to attach the camera / guns to an apache. Maybe I'll post an example some day ;)

Share this post


Link to post
Share on other sites

I've been playing this mod for a few weeks now - it's become integral in some of my favourite missions created!

Is it possible to call in an AI AC130 that will only fire upon targets which you lasermark?

Thanks

Share this post


Link to post
Share on other sites
Apache flying around like the AC130 would look weird ^^

But in theory it's possible to attach the camera / guns to an apache. Maybe I'll post an example some day ;)

Isn't that what most FLIR videos do? They hover around slowly and fire a missile or gun the taliban.

Share this post


Link to post
Share on other sites
Isn't that what most FLIR videos do? They hover around slowly and fire a missile or gun the taliban.

I think so... but my AC130 is playable :D

Is it possible to call in an AI AC130 that will only fire upon targets which you lasermark?

You can order the AC130 via action menu to cease fire.

You can also execute this line "LDL_AI_ceaseFire = true;" and force the AC130 to stop shooting ;)

Is there a list of missions using this mod?

would be cool.

Share this post


Link to post
Share on other sites
I think so... but my AC130 is playable :D

You can order the AC130 via action menu to cease fire.

You can also execute this line "LDL_AI_ceaseFire = true;" and force the AC130 to stop shooting ;)

would be cool.

Thanks - but I was already aware of that.

Is it not possible to order it to fire only upon lasermarked objects?

Share this post


Link to post
Share on other sites
Thanks - but I was already aware of that.

Is it not possible to order it to fire only upon lasermarked objects?

I don't get your problem :confused:

If the AC130 ceases fire it should only fire at your marked targets (as far as I remember I've scripted it that way)

cease fire doesn't mean that it's unable to shoot ;)

Share this post


Link to post
Share on other sites
I don't get your problem :confused:

If the AC130 ceases fire it should only fire at your marked targets (as far as I remember I've scripted it that way)

cease fire doesn't mean that it's unable to shoot ;)

Thanks man, just gave it a whirl and you're absolutely right.

I assumed cease fire was.. cease fire.. thanks!

Great script by the way, it's exactly what I wanted when I went looking a C130 script.

Share this post


Link to post
Share on other sites

Nice to see more people using this great script! Just curious if anyone tried the simple test mission I posted in post #331 and notice the same wierd AI behavior as I do?

/KC

Share this post


Link to post
Share on other sites

First off, very nice script pack! It's just simply awesome having CAS in the form of a Spectre.

Now I apologize upfront but I couldn't be arsed reading through all 30-40 pages of this thread so I'm simply reporting this, if it's a known issue just ignore my rant and please point me to a solution.

I got the script variant (v 0.6) set up on a test mission with a plane sitting on the tarmac. I could jump in the plane just fine, go to co-pilot and access the camera. I had a go at blowing some nearby buildings up and I exit it aight... now here's the problem. I tried to access the camera again and it kept coming up with "AC-130 is unavailable", which it obviously wasn't. After a bit of testing I figured out the bandit(s) was a few settings in LDL_options... more specifically:

"Disable Vehicle Detection"

"Disable Infantry Strobes"

"Disable Sounds"

If 2 or more of these are set to true it causes the gun camera to only be accessible once before completely locking out any user from using the plane as intended.

Now I took the liberty of having a quick look in the related scripts (I hope you don't mind) and found some interesting stuff:

ac130_att_main.sqf

waitUntil{(LDL_scriptTerminated >= 3)};

ac130_blink.sqf

...
waitUntil {sleep 0.1;(LDL_ac130_active && !LDL_disableBlink)};
...
...
...
LDL_scriptTerminated = LDL_scriptTerminated + 1;

ac130_troops.sqf

...
waitUntil {sleep 0.1; (LDL_ac130_active && !LDL_disableHUD)};
...
...
...
LDL_scriptTerminated = LDL_scriptTerminated + 1;

ac130_sound.sqf

...
waitUntil {sleep 0.1;(LDL_ac130_active && !LDL_disableSounds)};
...
...
...
LDL_scriptTerminated = LDL_scriptTerminated + 1;

Correct me if I'm wrong but if LDL_disableBlink, LDL_disableHUD and LDL_disableSounds are directly linked to the settings I mentioned before, the "waitUntil {};" would stall the individual functions completely.

This in turn would explain the "AC-130 is unavailable" since the ac130_att_main.sqf never reset LDL_ac130_active.

On a related note:

"Show Infantry Strobes at startup" and "Show Vehicle Detection at startup" seems to override respective "Disable ..." option. Intended behavior?

Edit: Noticed a .rpt message about some hex color codes. Problem lies in dialogParent.hpp.

Edited by mrCurry

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

×