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
base: master
Are you sure you want to change the base?
Conversation
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.
By the way, I wasn't sure whether I should work against |
Oh, nice. I just noticed this. I'll check the req. out next week, I'm on a vacation now ;) |
No hurry, there's more to come anyway :) |
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. |
Which folder did you try building? You should pack the
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. |
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. |
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 |
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. |
_getOutHandle = _vehicle addEventHandler ["GetOut", {_this spawn ccip_shutdown}]; | ||
|
||
if(isEngineOn _vehicle) then { | ||
_handle = [_vehicle, true] spawn ccip_start; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.