fett_li 15 Posted November 21, 2014 Okay, Iceman77 a I think, I missused "call". I don't know in which enviroment they are executed, for instance I think you can use sleep, etc. But ArmA is definitely waiting for each postInit function to be terminated which is the point ;-) Share this post Link to post Share on other sites
tonic-_- 53 Posted November 21, 2014 (edited) Okay, Iceman77 a I think, I missused "call". I don't know in which enviroment they are executed, for instance I think you can use sleep, etc. But ArmA is definitely waiting for each postInit function to be terminated which is the point ;-) postInit is ran in a non-scheduled environment. postInit: //--- Call postInit functions _fnc_scriptname = "postInit"; { { _time = diag_ticktime; [_x,_didJIP] call { private ["_didJIP","_time"]; ["postInit",_this select 1] call (missionnamespace getvariable (_this select 0)) }; ["%1 (%2 ms)",_x,(diag_ticktime - _time) * 1000] call bis_fnc_logFormat; } foreach _x; } foreach _this; preInit: //--- Call preInit functions _fnc_scriptname = "preInit"; { { _time = diag_ticktime; [_x]call { private ["_recompile","_functions_list","_functions_listPreInit","_functions_listPostInit","_functions_listRecompile","_time"]; ["preInit"] call (missionnamespace getvariable (_this select 0)) }; ["%1 (%2 ms)",_x,(diag_ticktime - _time) * 1000] call bis_fnc_logFormat; } foreach _x; } foreach _functions_listPreInit; postInit is called from a scheduled environment->non scheduled environment which can halt because its originally called from a scheduled->nonscheduled (which breaks the scheduled environment). This code is referenced from a3\functions_f\initFunctions.sqf preInit is ran from a scheduled environment but if you halt in it you halt the overall client initialization process. Edited November 21, 2014 by Tonic-_- Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 (edited) CH View Distance Script v0.91 Download Changelog: v0.91 - fixed: postInit error - fixed: minor code fixes - changed: updated UI style to match default Arma 3 style - changed: object view distance now can't be set higher than view distance - changed: "terrain" buttons replaced with listbox (feedback needed on this one) Edited November 22, 2014 by Champ-1 Share this post Link to post Share on other sites
legolasindar 3 Posted November 22, 2014 This! I not understand your answer, this is script version, not addon version. Share this post Link to post Share on other sites
Guest Posted November 22, 2014 Release frontpaged on the Armaholic homepage. CH View Distance Script v0.91 ================================================ We have also "connected" these pages to your account ( DudeGuyManBro ) on Armaholic. This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
taro8 806 Posted November 22, 2014 I not understand your answer, this is script version, not addon version. He agreed with the previous poster that he would also like to see an addon version being made. I would like to have this as an addon as well, my PC is pretty weak now, so when I set low draw distance I suffer horribly when I try out aircraft and helicopters. Share this post Link to post Share on other sites
Subscyed 10 Posted November 22, 2014 To the author: Will you make it possible to type in the exact values we want to set our view distance to? Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 To the author:Will you make it possible to type in the exact values we want to set our view distance to? Yeah, yeah, that's what I was thinking. But I don't know how to do it yet. Need to learn how to do it first. :D Share this post Link to post Share on other sites
iceman77 18 Posted November 22, 2014 (edited) With an editbox you should be able to grab the inputted text on button click for example. action = "[ctrlText ((finddisplay YOUR_DIALOG_IDD) displayctrl IDC_EDITBOX)] call CHAMP_fnc_settingChange;"; CHAMP_fnc_settingChange _value = call compile format ["%1;", _this select 0]; // -- Your stuff Useful functions aswell: BIS_fnc_filterString BIS_fnc_splitString Edited November 22, 2014 by Iceman77 Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 Thanks. What exactly 'action' does? When does it trigger? Share this post Link to post Share on other sites
iceman77 18 Posted November 22, 2014 (edited) When you press and release a button or active text control for example. eg; class MY_BUTTON: RscButton { text = "Confirm"; x = 0.411029 * safezoneW + safezoneX; y = 0.598 * safezoneH + safezoneY; w = 0.176484 * safezoneW; h = 0.042 * safezoneH; action = "[ctrlText ((finddisplay YOUR_DIALOG_IDD) displayctrl IDC_EDITBOX)] call CHAMP_fnc_settingChange;"; toolTip = "Validate the inputted text"; }; Edited November 22, 2014 by Iceman77 Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 With an editbox you should be able to grab the inputted text on button click for example. action = "[ctrlText ((finddisplay YOUR_DIALOG_IDD) displayctrl IDC_EDITBOX)] call CHAMP_fnc_settingChange;"; CHAMP_fnc_settingChange _value = call compile format ["%1;", _this select 0]; // -- Your stuff Useful functions aswell: BIS_fnc_filterString BIS_fnc_splitString systemChat str _value; No output :c ---------- Post added at 17:19 ---------- Previous post was at 17:13 ---------- class CHVD_rscFootViewDistance: CHVD_rscEdit { idc = 1006; x = 27.5 * GUI_GRID_W + GUI_GRID_X; y = 3.5 * GUI_GRID_H + GUI_GRID_Y; w = 3 * GUI_GRID_W; h = 1 * GUI_GRID_H; onKeyDown = "[ctrlText ((finddisplay 2900) displayctrl 1006)] call CHVD_fnc_onEBinput;"; }; systemChat str (_this select 0); This works, though. Share this post Link to post Share on other sites
iceman77 18 Posted November 22, 2014 Hmm. Seems to work fine for me using action. I use sideChat. I set up an extra (confirm) button on an existing project that already had a edit box. http://cloud-4.steampowered.com/ugc/541884859071487189/C7B0EBFF513BD85B706415C6879E7A3CC72C3C74/ DGM_fnc_buttonPressed _value = call compile format ["%1;", _this select 0]; player sideChat format ["%1", _value]; class DGM_BUTTON_TESTER: RscButton { text = "Confirm"; //--- ToDo: Localize; x = 0.811029 * safezoneW + safezoneX; y = 0.598 * safezoneH + safezoneY; w = 0.176484 * safezoneW; h = 0.042 * safezoneH; action = "[ctrlText ((finddisplay IDD_DGM_DIALOG) displayctrl IDC_DGM_EDITBOX_CREATEGROUP)] call DGM_fnc_buttonPressed;"; }; Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 It doesn't matter. It's the same thing, right? ---------- Post added at 17:31 ---------- Previous post was at 17:28 ---------- Oh so you use button... I was jsut typing stuff. I don't think button is necessary. Share this post Link to post Share on other sites
iceman77 18 Posted November 22, 2014 (edited) Yeah. Well I'm not gonna do something different and not mention it.. and have you potentially chasing your tail. ---------- Post added at 06:33 ---------- Previous post was at 06:31 ---------- Yeah. I said "button for example" long ago. You don't have to retrieve the edit box text via button action... I was only providing an visual example of how to retrieve the text from the edit box. Though is changing the VD and such as they type what you want :confused: I'll show myself the door :) Edited November 22, 2014 by Iceman77 Share this post Link to post Share on other sites
champ-1 40 Posted November 22, 2014 I guess I wasn't paying attention. Anyway, thanks for showing 'BIS_fnc_filterString', that would be handy. Share this post Link to post Share on other sites
iceman77 18 Posted November 22, 2014 (edited) I guess I wasn't paying attention. Anyway, thanks for showing 'BIS_fnc_filterString', that would be handy. Also thanks for showing how to retrieve the editbox text Iceman77. There I fixed it. That wasn't that hard was it? Ignore me I'm a fucking dick. Edited November 23, 2014 by Iceman77 Share this post Link to post Share on other sites
champ-1 40 Posted November 23, 2014 CH View Distance Script v0.92 Download Changelog: v0.92 - added: interactive textboxes to input view distance and terrain grid values directly - changed: reworked 'onSliderChange' function Share this post Link to post Share on other sites
iceman77 18 Posted November 23, 2014 Nice work Champ! :) Share this post Link to post Share on other sites
kremator 1065 Posted November 23, 2014 CH View Distance Script v0.92Download https://dl.dropboxusercontent.com/u/16004923/regular/pv/CHVD.jpg Changelog: v0.92 - added: interactive textboxes to input view distance and terrain grid values directly - changed: reworked 'onSliderChange' function Fantastic news. Would it be possible to have this as an addon please? Share this post Link to post Share on other sites
Guest Posted November 23, 2014 Release frontpaged on the Armaholic homepage. CH View Distance Script v0.92 ================================================ We have also "connected" these pages to your account ( DudeGuyManBro ) on Armaholic. This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
Ian Bones 35 Posted November 23, 2014 (edited) Hey, nice work. A few errors I found: -Every time I start a game / join our server I have to change a setting so the script takes effect. -Since this update I get this script Error: and there is no way to input view distance and terrain grid values directly into interactive textboxes. Edited November 23, 2014 by Gerippe Share this post Link to post Share on other sites
Subscyed 10 Posted November 23, 2014 Thank you Iceman and Champ! You guys are absolute stars. Share this post Link to post Share on other sites
champ-1 40 Posted November 23, 2014 Hey, nice work.A few errors I found: -Every time I start a game / join our server I have to change a setting so the script takes effect. -Since this update I get this script Error: http://abload.de/img/error53dho.jpg and there is no way to input view distance and terrain grid values directly into interactive textboxes. http://abload.de/img/error7le7p.jpg Doesn't seems like the error even from my script and you using version 0.91. Try to remove CHVD folder completely and redownload it from first post. Share this post Link to post Share on other sites