Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to addon #6

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Convert to addon #6

wants to merge 7 commits into from

Conversation

lstor
Copy link

@lstor lstor commented Jul 9, 2014

This is basically a working addon version. It is tested and works for singleplayer, even if you don't start in a plane or if you switch planes.

There is a known issue with having multiple "playable" units. I think that's a minor issue and that it shouldn't be a hindrance to the addon version, but will look into it regardless. I think it might be related to #4, and I suspect it needs some more handlers/checking on the state of the player and plane. See the commit message of e4025f7 for more information.

README is updated with relevant information. I also added a LICENSE file (copy/paste from README).

I don't use an event handler to see if the player is in a plane, but the waitUntil has a 1 second sleep, which should make the CPU footprint minuscule.

Packaged pbo included in a6ac143 and since reverted. The pbo is just a pbo packaging of addons\arma_ccip.

Some polishing should still be done, stay tuned.

Lars Storjord added 7 commits July 9, 2014 20:24
Note: Same limitation as script version is currently in effect. This
only works when the player starts in a plane (for now).
This version features a fully working addon version.

This has been tested will all three supported planes, and moving
between them. Only tested in singleplayer.

Known issue:
- If using several playable characters in planes, the script is confused.
  The correct way to fix this is probably to add a check to continuously
  check if the driver (pilot) is a player. An alive check should probably
  also be added.

Some cleaning up is in order before a proper release.

Fixes #5.
This reverts commit a6ac143.
@lstor
Copy link
Author

lstor commented Jul 9, 2014

By the way, I wasn't sure whether I should work against master or arma-dev, so I took a chance. Let me know if you want me to migrate them to the other branch instead.

@jonimake
Copy link
Owner

Oh, nice. I just noticed this. I'll check the req. out next week, I'm on a vacation now ;)

@lstor
Copy link
Author

lstor commented Jul 18, 2014

No hurry, there's more to come anyway :)

@jonimake
Copy link
Owner

Did you try building the addon? I'm reviewing the pull req. and I can't seem to get the addon to build correctly. I made the pbo and put it into arma 3 root /addons folder, and upon start the game complains about "arma_ccip\init.sqf script not found".

I checked out the request into Documents\GitHub\arma-ccip. arma-ccip contains the readme and so on.
Then I tried building it with the A3 addon builder with that same path.

@lstor
Copy link
Author

lstor commented Jul 26, 2014

Which folder did you try building? You should pack the arma_ccip-folder into a pbo, then load the containing folder as a mod:

@arma-ccip
|
|- addons/
|  |
|  |- arma_ccip/    <-- This gets built into the pbo just below
|  `- arma_ccip.pbo
|
`- mod.cpp

You can checkout a6ac143 and simply copy the entire repository to the Arma 3 folder and load it as a mod from there. That should work.

@jonimake
Copy link
Owner

Roger that. I got it working, I was trying to pack the parent folder of that one, the one that also included the mod.cpp.

Now I gotta figure out how to make the key files.

@lstor
Copy link
Author

lstor commented Jul 26, 2014

I had a feeling that was the problem :) Not sure if you've already signed it, but if not: You gotta download the Arma 3 tools (via Steam is easiest) and first use DSCreateKey to create a key, and then use DSSignFile to sign the pbo. Both have a GUI version as well.

@jonimake
Copy link
Owner

Hmm, I'll probably change the endless loop to an event based thing. It's a shame there isn't a "GetIn" event for units, just vehicles.
Plan is to attach a getIn handler to all airplanes that are in the mission on mission start plus ones that are created on the fly with the createVehicle command.

_getOutHandle = _vehicle addEventHandler ["GetOut", {_this spawn ccip_shutdown}];

if(isEngineOn _vehicle) then {
_handle = [_vehicle, true] spawn ccip_start;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the endless while loop execute this all the time when the player is inside the vehicle and the engine is on?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah, you're right. Not sure how I missed that. That should definitely be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants