HazJ 1289 Posted March 20, 2018 (edited) !!! THIS PROJECT HAS NOW BEEN ABANDONED !!! !!! SUPPORT WILL BE LIMITED AND NO NEW VERSIONS WILL BE RELEASED FOR THE FORESEEABLE FUTURE !!! Hi all, Thought I'd release this for anyone to use. I didn't create the display, I exported it from game files. I have included some code for the demo but just note that it isn't MP compatible by default (only shows + updates per client). The signal doesn't affect the download speed by default. Feel free to modify and improve, just credit me for the base code and Bohemia Interactive for the display. https://i.imgur.com/5kgv7Qn.jpg https://i.imgur.com/8kLj96B.jpg https://i.imgur.com/uY8fehZ.jpg Things you may need to change: _object = dataTerminal; // variable name of object (REQUIRED) _increment = 1; // how fast it increments Download: https://1drv.ms/u/s!ArYSs9w5RSIDhg51XA3dDuclYRQ8 OR Download Data (from End Game) v1.0 Edited May 6, 2021 by HazJ Project has now been abandoned 6 4 Share this post Link to post Share on other sites
Guest Posted March 21, 2018 Thanks for sending us the release :) An Armaholic mirror is now available: Download Data (from End Game) v1.0 Share this post Link to post Share on other sites
johnnyboy 3789 Posted March 21, 2018 Very useful. Thanks @HazJ! 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted March 21, 2018 Sweet! How do I call the download start with an addAction or a trigger? Share this post Link to post Share on other sites
HazJ 1289 Posted March 21, 2018 1 hour ago, zagor64bz said: Sweet! How do I call the download start with an addAction or a trigger? OBJECT addAction ["Download data", {("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutRsc ["rsc_downloadingData", "PLAIN", 0.01, false];}]; 1 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 21, 2018 NICE! Good work HazJ! 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted March 21, 2018 49 minutes ago, HazJ said: OBJECT addAction ["Download data", {("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutRsc ["rsc_downloadingData", "PLAIN", 0.01, false];}]; AWESOME, thank you. 1 Share this post Link to post Share on other sites
Capt MacTavish 3 Posted April 2, 2018 Hey is there a way to set a volume to the setObjectTexture that play's the intro.ogv. From what I noticed it play's pretty loud and you do not have to be close to the object in order to hear it. Share this post Link to post Share on other sites
HazJ 1289 Posted April 2, 2018 10 minutes ago, Capt MacTavish said: Hey is there a way to set a volume to the setObjectTexture that play's the intro.ogv. From what I noticed it play's pretty loud and you do not have to be close to the object in order to hear it. I am not sure. I assume the video has the sound. You could separate it and then play the sound on top using say3D alternative syntax. Share this post Link to post Share on other sites
Capt MacTavish 3 Posted April 6, 2018 @HazJ I believe it could of been the video but as for say a command to set the volume to a specific db, no luch yet. I have been trying to test say3D, playSound, playMusic to test it with attaching it to a vehicle addAction and that doesn't work for me either. Share this post Link to post Share on other sites
HazJ 1289 Posted April 6, 2018 It is simple to test. Play the video (ogv) out of game using VLC Player (is what I use). If you hear sound then it is from the video. There is no command to affect sound in video files (that I know of). Can you please provide a video or upload your mission somewhere so I take a better look at the exact issue. @Capt MacTavish Share this post Link to post Share on other sites
zagor64bz 1225 Posted April 10, 2018 How do I make a task succeeded after DL the data? Thank you. Share this post Link to post Share on other sites
HazJ 1289 Posted April 10, 2018 Hello @zagor64bz - At the moment, just add after while loop. I will modify the function and make it return BOOL and other things so you can check when complete / progress percent. I have a few things planned also. No confirmed ETA, busy with RL work and other ArmA projects at the moment. My plan is to update these in following order: - Respawn selection - Notification system - Download data Share this post Link to post Share on other sites
zagor64bz 1225 Posted April 10, 2018 10 minutes ago, HazJ said: just add after while loop Okeyyyyy...could you give me an example? For example in something like this? waitUntil {???}; ["TaskID", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; while {???} do {["Task03", "SUCCEEDED",true] spawn BIS_fnc_taskSetState;}; 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 10, 2018 Sure. ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; After this, at the bottom of the whole code. You can put whatever code you want. In your case: ["TaskID", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; As you said. ^^ The code won't run until the while loop is complete. There is no need for waitUntil for this reason. However, it will exit the while loop (and the script file - at least it should) if you are X distance away (abort). EDIT: I wouldn't usually recommend adding it in directly in case you re-use this in same mission with different task or say without task, etc but as said I am busy atm with other things. I will try to update this at the weekend. @zagor64bz 1 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted April 10, 2018 3 minutes ago, HazJ said: I will try to update this at the weekend. Hey man REALLY thank you for the help. 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 10, 2018 No problem. I tend to get bored of projects easily when there is lack of motivation and interest from others. The notification system which I released recently gave me a load of motivation as people seemed interested and gave some feature requests/ideas. If you (or anyone) have any feature requests for this project (or any other - in specific threads obviously) or anything let me know. As said, the more interest from people, the more motiviation and time I put into things. 2 Share this post Link to post Share on other sites
snakeplissken 96 Posted April 22, 2018 @Hajz, I'm sorry if you're too busy. I wonder if you have how to make the command not run when the download is canceled when I move away from the object? Because when I move away from the object the download the is cancel but the command at the end of the script will be executed. I put the command below to execute, it is at the end of your script Download_OK = true; publicVariable "Download_OK"; Download_OK remoteExec ["true"]; (I did this for the variable "Download_OK" to activate a trigger in the other machines.) When I move away from the object the download is canceled, but the command at the end of the script will still be executed. I would like to know if you have the execute the command only when the download is completed, and when I move away from the object the download being canceled and the command will not be executed. *I hope you have understood, because I use the google translator to communicate me here in the Forum. Share this post Link to post Share on other sites
HazJ 1289 Posted April 22, 2018 Uhh. I assume your code is at the end, after: ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; Put it here as well: if (player distance2d getPosATL _object > 20) exitWith { ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // your code... }; Share this post Link to post Share on other sites
snakeplissken 96 Posted April 22, 2018 Just warning, I decrease the signal distance, and also put all the sqf files inside a folder named "script". This is what I have inside the file "fn_downloadData" scriptName "script\fn_downloadData"; /* Code written by Haz */ #define __FILENAME "script\fn_downloadData.sqf" if (isDedicated || !hasInterface) exitWith {}; disableSerialization; _object = dataTerminal1; _getSignal = { _signal = switch (true) do { case (player distance2d getPosATL _object <= 5) : { "a3\Ui_f\data\IGUI\RscTitles\RscHvtPhase\JAC_A3_Signal_4_ca.paa" }; case (player distance2d getPosATL _object > 5 && player distance2d getPosATL _object <= 6) : { "a3\Ui_f\data\IGUI\RscTitles\RscHvtPhase\JAC_A3_Signal_3_ca.paa" }; case (player distance2d getPosATL _object > 6 && player distance2d getPosATL _object <= 9) : { "a3\Ui_f\data\IGUI\RscTitles\RscHvtPhase\JAC_A3_Signal_2_ca.paa" }; case (player distance2d getPosATL _object > 9 && player distance2d getPosATL _object <= 13) : { "a3\Ui_f\data\IGUI\RscTitles\RscHvtPhase\JAC_A3_Signal_1_ca.paa" }; case (player distance2d getPosATL _object > 13) : { "" }; }; _signal }; _display = uiNamespace getVariable "disp_downloadingData"; (_display displayCtrl 200) ctrlSetText "DOWNLOADING DATA..."; _downloaded = 0; _increment = 2; while {_downloaded < 100 && "layer_rsc_downloadingData" in allCutLayers} do { _downloaded = _downloaded + _increment; (_display displayCtrl 300) ctrlSetText format ["%1", {alive _x && _x distance2d getPosATL _object <= 13} count allUnits]; (_display displayCtrl 400) progressSetPosition (_downloaded / 100); (_display displayCtrl 500) ctrlSetText format ["%1%2 / 100%2", _downloaded, "%"]; (_display displayCtrl 700) ctrlSetText format ["%1", call _getSignal]; if (player distance2d getPosATL _object > 13) exitWith { ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; Download_OK = true; publicVariable "Download_OK"; Download_OK remoteExec ["true"]; }; sleep 1; // hintSilent "still running"; }; ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // hintSilent "not running"; Download_OK = true; publicVariable "Download_OK"; Download_OK remoteExec ["true"]; ["Bingo!"] remoteExec ["hint", 0]; I had placed the command only at the end of your file, so after I also put it where you indicated it. But the command continues to executed when I move away from the object and the signal drops. Share this post Link to post Share on other sites
HazJ 1289 Posted April 23, 2018 What??? I don't understand what you are saying or what you are trying to do. What command? EDIT: It shouldn't run again after the end or after the exitWith command, uncomment the hintSilent for debugging and see if that still shows. Share this post Link to post Share on other sites
greenpeacekiller 14 Posted April 23, 2018 I think what he is trying to achieve here is have different commands excuted. One for when the download is canceled because the player is out of range and another for when the download is actually completed 100% 1 Share this post Link to post Share on other sites
HazJ 1289 Posted April 23, 2018 Oh. Okay: // code for when aborted goes in here... if (player distance2d getPosATL _object > 13) exitWith { // code for when completed goes at end of file... Share this post Link to post Share on other sites
greenpeacekiller 14 Posted April 23, 2018 I quickly tested that. while {_downloaded < 100 && "layer_rsc_downloadingData" in allCutLayers} do { _downloaded = _downloaded + _increment; (_display displayCtrl 300) ctrlSetText format ["%1", {alive _x && _x distance2d getPosATL _object <= 20} count allUnits]; (_display displayCtrl 400) progressSetPosition (_downloaded / 100); (_display displayCtrl 500) ctrlSetText format ["%1%2 / 100%2", _downloaded, "%"]; (_display displayCtrl 700) ctrlSetText format ["%1", call _getSignal]; hint "cancel"; if (player distance2d getPosATL _object > 20) exitWith { ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; }; sleep 1; // hintSilent "still running"; }; ("layer_rsc_downloadingData" call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; hint "Complete"; Maybe I am doing this wrong. But doing it like this wont work. the hint cancel gets displayed when you start Anything you put at the end will get excuted if you run out of range aswell as when its actually at 100% Share this post Link to post Share on other sites