Jump to content
LurchiDerLurch

AC-130 Script for ARMA2 (0.3)

Recommended Posts

I've had it working, I've had it not working, and just about everything in between (at least that's what it feels like!)

At the moment, I've got Draper's Air Support script with respawn working, via an eventhandler on the unit as well as the instruction to initialise the respawn script on initialization. That way there's no issues with getting it up, and multiple options etc.

However, I can't seem to get this script to run from said script. I'll grab the code and place it in here in a mo. Any ideas as to what's up are welcome ;)

Ok, the init line of the player includes:

this exec ""respawn_player.sqf""; this addEventHandler [""killed"", {_this execVM ""respawn_player.sqf"";}];

and the referenced "respawn_player.sqf" is as follows, originally I had it the exact same as you would place them in the init line, but I tried different ways to get it to work, which didn't work :p:

sleep 21;
ASfirstrun = true;
if (player == RESCUE2) then {nul = [RESCUE2,"jadam","lgb","cbuap","cbuat","cbumine","cas","helo"] execVM "airSup\airSupInit.sqf"};
_man addAction ["Call AC-130 (AI)", "LDL_ac130\ac130_action_map_AI.sqf", "_target == RESCUE2"];
_man addAction ["Call AC-130", "LDL_ac130\ac130_action_map.sqf", "_target == RESCUE2"];

Maybe there's a little problem:

this exec ""respawn_player.sqf""

Better use execVM for sqf.

Are you sure that he's executing the lines on respawn? Is _man not null or something comparatively bad? Because the code should work...

Instead of this part:

, "_target == RESCUE2"

Why is it in the addAction command?

Share this post


Link to post
Share on other sites

Again, just trying different things :)

The script is executing fine, as the AirSupInit.sqf loads without fail. but when I set the lines as you would in the init line (this exec addAction ["Call AC-130", "LDL_ac130\ac130_action_map.sqf"]) it still doesn't do anything, I can't see anything that I can be doing wrong, but it just isn't wanting to play >_<

Share this post


Link to post
Share on other sites
as you would in the init line (this exec addAction ["Call AC-130", "LDL_ac130\ac130_action_map.sqf"]) it still doesn't do anything

This will never do anything...

exec needs a script... addAction is a command

and "this" must be an object... make sure it's an object.

Share this post


Link to post
Share on other sites

So it would need to have the object (RESCUE2) with 'this' then? And the exec needs to be execVM?

Share this post


Link to post
Share on other sites

OBJECT execVM "function.sqf";

OBJECT addAction ["NAME OF ACTION", "action.sqf"];

In your case:

this execVM "respawn_player.sqf";

this addEventHandler ["killed", {_this execVM "respawn_player.sqf";}];

if this is an object! For example if you put this in the init line (editor).

Otherwise:

player execVM "respawn_player.sqf";

player addEventHandler ["killed", {_this execVM "respawn_player.sqf";}];

OR:

RESCUE2 execVM "respawn_player.sqf";

RESCUE2 addEventHandler ["killed", {_this execVM "respawn_player.sqf";}];

The same thing in your "respawn_player.sqf"...

Are you sure _man is an object?

Edited by LurchiDerLurch

Share this post


Link to post
Share on other sites

Hey Lurch Great addon but the Sounds of the Guys talking. I realize they are jsut for Ambiance but man they gotta go. I kept having to wait for them to stop talking so I could tell my pilot where to orbit.

Is there a way in a script to disable them? that is the only thing keeping me from enjoying this more.

Share this post


Link to post
Share on other sites

How I make this script working on warfare? The c130 just lagging for me at warfare. But then I not running warfare there is no trouble.

Share this post


Link to post
Share on other sites

Hi I made a quick AC 130 video with OA and 0.4 version of the script. Works great and it was alot of fun see the link below. The 104mm explosion effects were working great once again it was really small before that but it somehow fixed it self. Many thanks to LurchiDerLurch for this wonderful addon.

Edited by bearking19

Share this post


Link to post
Share on other sites

Yes, it seems like we have some bad desync in MP, but we haven't!

It's just bouncing around in the air like a rubber ball. :D

Share this post


Link to post
Share on other sites

hmm yes. I'm also having a problem with the script pack. Once the AC-130 is called it appears, jumps around in the sky a bit and then I get a messagebox telling me that one of the sounds can't be found.

Share this post


Link to post
Share on other sites

Is there a way to make the shells hit the ground with a small delay, like 3-4 sec... ATM it just lacks the feeling of being high and far from targets... And it's just too easy to hit something.

Share this post


Link to post
Share on other sites
;1690678']Is there a way to make the shells hit the ground with a small delay' date=' like 3-4 sec... ATM it just lacks the feeling of being high and far from targets... And it's just too easy to hit something.[/quote']

because it isn't high and far from targets....

the problem is that the shells fall to the ground if I slow them down... it would also look unrelastic...

the only solution would be another AC130 version with no model...

Share this post


Link to post
Share on other sites

Maybe it's not high and far, but it is supossed to be like this. :p

Just look:

http://upload.wikimedia.org/wikipedia/en/3/3d/DF-ST-89-00410.JPEG

Vid (A-stan AC-130 mission):

http://www.militaryphotos.net/

Go to "Military Videos" and scroll all the way down, should be last one.

^ This while I'm waiting for permission to put the direct link.

Photo, that doesn't look like low flying... At least 6-7 thousand feet (2000m). And in ArmA I fly mostly at 1000m, higher is just nonsense - requires increasing VD dramatically to see anything good (and I'm playing on pretty high settings, sig). That combined with complicated mission (meant Domino here) results in slideshow and huge lagging of plane/camera.

Vid? Just look, 105 shell hits thte ground and at the same time crew reports gun ready... How long does it takes to reload 105? Few seconds...

And it's not like I'm not liking it, but we all want (including you) to make this better. Am I right? Just a few suggestions for future development...

Share this post


Link to post
Share on other sites
;1690734']

And it's not like I'm not liking it' date=' but we all want (including you) to make this better. Am I right? Just a few suggestions for future development...[/quote']

Sure. I'm happy about every idea and feedback ;)

But english is not my first language... maybe there are sometimes some "missunderstandings" ^^

I know where the real AC130 operates but that's one limit with the A2 engine =(

Share this post


Link to post
Share on other sites

But english is not my first language... maybe there are sometimes some "missunderstandings" ^^

So my... :) Though, my German is crappy... Don't know how I have such a good results in school...

I know where the real AC130 operates but that's one limit with the A2 engine =(

That's why it must be done in other way, preferably delaying shot...

Like this:

shot (mouse click)

playSound "Shot";

sleep 3;

...and then create a shell.

Should be good...

EDIT: I found the .sqf responsible for creating shells, added before creating sleep 3;. Will test in a sec...

Share this post


Link to post
Share on other sites

Yeah but it looks strange if you shoot and with an delay of 3 sec you can see the tracers flying away from the plane :D

Share this post


Link to post
Share on other sites

Well, I'm trying something different... Will report ASAP.

Share this post


Link to post
Share on other sites

Lurchi (or anyone else) I need your help. I am using the script pack to add an AI controlled AC-130 to my mission but when I call him in ([getPos player, 1000, 1000, true]call LDL_ac130_rot_setup; ) the gunship appears in the sky, jumps around a bit and then I get "Sound LDL_gun02 not found" appearing in a message box. After I click continue, all works as intended. Is there any way I can fix this problem or even just stop it looking for the sounds?

Share this post


Link to post
Share on other sites
Lurchi (or anyone else) I need your help. I am using the script pack to add an AI controlled AC-130 to my mission but when I call him in ([getPos player, 1000, 1000, true]call LDL_ac130_rot_setup; ) the gunship appears in the sky, jumps around a bit and then I get "Sound LDL_gun02 not found" appearing in a message box. After I click continue, all works as intended. Is there any way I can fix this problem or even just stop it looking for the sounds?

You could disable the sound script but are you sure that you have the sound folder?

Share this post


Link to post
Share on other sites
You could disable the sound script but are you sure that you have the sound folder?

Sound folder is definately there. How do I disable the sound script?

Share this post


Link to post
Share on other sites

Probaly the problem is that script is looking for sound "LDL_gun2" or something like this, which doesn't exist. AFAIK sound name is "gun2", so it's just mismatched names. And I'm getting this also in script version...

Share this post


Link to post
Share on other sites

I know nothing about configs, mods etc however I can see from the .cpp file in the script pack that it defines classes "LDL_gun2" "LDL_gun3" etc and sets what the relevant .ogg files are. Something is happening to mess with that and so it can't find them... I think.

Share this post


Link to post
Share on other sites

class LDL_gun02

{

name = "LDL_gun02";

sound[] = {\LDL_ac130\Sounds\gun02.ogg, db+3, 1.0};

titles[]= {};

};

Means you call the sound with PlaySound "LDL_gun02" but the file itself is gun02 located in the Sounds folder

The .cpp file plays no role with script version. You could delete it from there.

Share this post


Link to post
Share on other sites

one of the best addons IMO :) real nice with the flashing strobes on friendly troops, wish this could be availabe for all OA units who use FLIR

is it possible to let AI cover me with the addon? for example, I am highcommander, the AC-130 subordinate, I call him from the holding position and after he arrives he starts circeling.

anybody already making a model for this?

thnx!

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

×