Jump to content
xendance

CCIP script for aircrafts

Recommended Posts

I found selection name, but I guess not every weapon has it.

JS_JC_FA18E_ccipProvider.sqf

_allowedWeapons = [
"js_w_fa18_m61",
"js_w_fa18_GBU12LGBLaucher",
"js_w_fa18_GBU38BombLauncher"];

_gatlinInfo = {_this selectionPosition "nosegun"};
_gbu12 = {[0,0,0]};
_gbu38 = {[0,0,0]};

_pairs = [];

_pairs = [_pairs,"js_w_fa18_m61",_gatlinInfo,false] call BIS_fnc_addToPairs;
_pairs = [_pairs,"js_w_fa18_GBU12LGBLaucher",_gbu12,false] call BIS_fnc_addToPairs;
_pairs = [_pairs,"js_w_fa18_GBU38BombLauncher",_gbu38,false] call BIS_fnc_addToPairs;

[_allowedWeapons, _pairs];

How do I do that?

I thought I have some basic understanding of scripts, but what you are saying doesn't make any sense to me. lol

Exactly like that.

You can visualize weapon position by going into includes.sqf and uncomment the //#define WEAPON_POS_DEBUG line.

Share this post


Link to post
Share on other sites

this is waaaaay cool. gonna test the shit out of it today. thx for doing this! and keep it up!

Share this post


Link to post
Share on other sites
I found selection name, but I guess not every weapon has it.

JS_JC_FA18E_ccipProvider.sqf

_allowedWeapons = [
"js_w_fa18_m61",
"js_w_fa18_GBU12LGBLaucher",
"js_w_fa18_GBU38BombLauncher"];

_gatlinInfo = {_this selectionPosition "nosegun"};
_gbu12 = {[0,0,0]};
_gbu38 = {[0,0,0]};

_pairs = [];

_pairs = [_pairs,"js_w_fa18_m61",_gatlinInfo,false] call BIS_fnc_addToPairs;
_pairs = [_pairs,"js_w_fa18_GBU12LGBLaucher",_gbu12,false] call BIS_fnc_addToPairs;
_pairs = [_pairs,"js_w_fa18_GBU38BombLauncher",_gbu38,false] call BIS_fnc_addToPairs;

[_allowedWeapons, _pairs];

How do I do that?

I thought I have some basic understanding of scripts, but what you are saying doesn't make any sense to me. lol

is it possible to make this work for the peral a10c ?

i tried it but it didn't work -.-*

Share this post


Link to post
Share on other sites
is it possible to make this work for the peral a10c ?

i tried it but it didn't work -.-*

I'll look into it when I'm less busy with my studies.

I did configure it myself for peral's A-10 months ago, when I was developing the script, so it should be possible.

But I'll look into it later.

Share this post


Link to post
Share on other sites

I`m loving the script. Will definately add it to my wip addon in time.

For now I`m focusing on implementing it for our community.

I got this working nice with CBAs Extended Init EventHandler called from missions description.ext:

class Extended_Init_EventHandlers {
class B_Plane_CAS_01_F {
 init = "_this execVM ""jonimake_ccip\jonimake_ccip.sqf""";
};
};

Although I had to add "_this = _this select 0;" into the jonimake_ccip.sqf because _this was passed as an array.

Basically it will run the script for all editor placed and Zeus placed Wipeouts without hiccups.

The problems started when I got into testing the script in MP enviroment.

Only one player is able to use the script at one given time, if someone else gets into a wipeout while you`re using the script, it will turn it off for you and turn it on for the other player.

Maybe the script should be runned as a loop that checks for the players vehicle and then adds the event handlers only to that vehicle, any better ideas?

Edited by eRazeri

Share this post


Link to post
Share on other sites

eRazeri, if you haven't already seen the github notification: You can see my changes for turning it into an addon on GitHub.

That works pretty well for singleplayer, and doesn't require any XEH. Regarding the multiplayer issue, I believe that's related to issue #4 on GH and what I refer to in my commit message. I'll have a look at it unless Xendance beats me to it.

I expect the addon version to be incorporated into Xendance's public version once it's been fully tested, reviewed and polished. In the meantime, if you're interested in checking out the addon version, you can get it from here. (Distributed with permission in accordance with the MIT license.)

Share this post


Link to post
Share on other sites
Maybe the script should be runned as a loop that checks for the players vehicle and then adds the event handlers only to that vehicle, any better ideas?

I worked on that idea and achieved MP compatibility by making this as the init of the script:

http://pastebin.com/j9iZBQEC

Lstor, I see that you made a pretty similar solution for it =)

Had a blast having a JTAC training yesterday with 2 Warthogs :P

Share this post


Link to post
Share on other sites

Ah, yes, we're definitely in the same mindset here :)

Simply checking for whether the player is still in the plane, like you do, is an interesting idea. I'll have to look into that further. That could solve the issue for changing player unit in SP too, I think.

To break it down, the script just needs to handle two states and their transitions:

1. Player not in supported vehicle, or in supported vehicle with engine off.

2. Player in supported vehicle with engine on.

I think approaching from that angle could simplify the code a bit. You've already done a great start :) I like that you added a list of supported vehicles instead of just checking isKindOf "plane" - I had a mental note to do the same.

A quick tip for your script: Store a handle to the event handlers, and remove only that EH. Otherwise you risk interfering with other code. Something like:

private "_getoutHandle";
_getoutHandle = _plane addEventHandler ["GetOut", {_this spawn ccip_shutdown}];

// ...

_plane removeEventHandler ["GetOut", _getoutHandle];

Edited by Lstor
Added a bit

Share this post


Link to post
Share on other sites
Thanks for working on the addon version guys ! MUCHO thanks!

Thanks! Looking forward to it!

Share this post


Link to post
Share on other sites
Thanks for working on the addon version guys ! MUCHO thanks!
Thanks! Looking forward to it!

The current version (linked to above) works sufficiently for singleplayer, and hopefully I'll have a fully working addon version that works in multiplayer too within a week :) Any testing of the addon version is very welcome, please let me know if you find any bugs. I think Xendance is quite busy these days, but since he was nice and released arma-ccip under a reasonable license, I can release addon versions in the meantime regardless.

Share this post


Link to post
Share on other sites

An MP version would be greatly appreciated. I can test on my dedi setup if you need guys.

Share this post


Link to post
Share on other sites
[...]but since he was nice and released arma-ccip under a reasonable license, I can release addon versions in the meantime regardless.[...]

Why, oh why, do not all people release their stuff under this license. :j:

Can't wait for a multiplayer addon version!

Share this post


Link to post
Share on other sites

Any chance you can make it so that it`s possible to use it for both crewmen at the same time? That way,we could use a turret or maybe Mapklick onto a target and it possible to hav a guy in the front fiering rockets at on target,and the other could drop LGB on another,at the same time.

Maybe it`s working if you loop the script to altenate between the seats .I love to use this in helicopters,it can be a pain to properly align with a target in Vanilla system.

Keep it up! I would like to try this in Texan 2 plane.

But to be able to use it,I think that most people need it to be an addon Pbo. ;)

If this could help aiming GunPods of helicopters,it is most wellcomed.Armscore A-109 to name one....tnx.

Edited by Teddybear1

Share this post


Link to post
Share on other sites
Any chance you can make it so that it`s possible to use it for both crewmen at the same time?

Once MP is implemented properly, that should work more or less out-of-the-box.

Share this post


Link to post
Share on other sites

You'll have me giggling like a school-girl when this is released as an MP compatible addon (that picks up all suitable aircraft). DO IT !!

Share this post


Link to post
Share on other sites

There is a bit of an error, not somuch in the script, but in the reticle.

The reticle is drawn some 30 or 40 pixes above the actual impact point. Hence, the further you are away from the impactpoint (the higher you fly) the shorter the bombs will fall.

I think it's some issie with the drawicon3d command...

Share this post


Link to post
Share on other sites

Are there still intensions to release is as an addon?

Share this post


Link to post
Share on other sites
It's allready out.

You can download it from the Opening Post.

Has anyone been able to get the addon version to work with the Virtual Vehicle Spawner?

I mean - without the addon loaded, my VVS works fine; with the addon loaded, my VVS is empty. Is this a known problem or incompatibility?

Share this post


Link to post
Share on other sites
Maybe I'm missing the link, but all I see is the script version.

It's not in the first post that I could see, however if you go to this page you should find it...

Share this post


Link to post
Share on other sites
It's not in the first post that I could see, however if you go to this page you should find it...

I don't understand how to download the addon version from this page... Can you please explain?

Xendance could you please post the addon version on a dropbox page or some host provider like that, and update the first post with it? I'm sure that a lot of players have missed that.

Share this post


Link to post
Share on other sites
I don't understand how to download the addon version from this page... Can you please explain?

Xendance could you please post the addon version on a dropbox page or some host provider like that, and update the first post with it? I'm sure that a lot of players have missed that.

+1, I have missed it and I can´t dl it as a PBO from github, it comes as scripts, thou the page states it is on .pbo form =P

Github is cool for version tracking and all, but for public release, pleeeeease use dropbox and armaholic, they´re both reliable and visible for all!

cheers!

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

×