csk222 23 Posted September 21, 2014 I have a simple altimeter script that I would like to use when parachuting out of helicopters. It works great when I'm in the helicopter and once my parachute is deployed, but I would like it to also display when I am free falling to know when to open my parachute. --- show_altimeter script: if !(isNull player) then { private ["_soldier","_altitude","_text","_dsp"]; _soldier = _this select 0; while {(!(vehicle player == player))} do { sleep 1; _altitude = (getPosATL _soldier) select 2; _text = format["%1 %2","<t size='1'>" + "Altitude:" + "</t>" + "<br />",_altitude]; _dsp = [_text,0.01,0.01,10,-1,0,90]spawn bis_fnc_dynamicText; }; terminate nulsalt; }; --- while {(!(vehicle player == player))} do { I believe that this is the line that needs to be changed but I don't know what replaces that. Share this post Link to post Share on other sites
iceman77 18 Posted September 21, 2014 (edited) Tweaked. I'd personally do it a different way than dynamic text. My2C. if (isDedicated) exitWith {}; private ["_soldier","_altitude","_text","_dsp"]; _soldier = _this select 0; while {!isTouchingGround _soldier} do { sleep 1; _altitude = (getPosATL _soldier) select 2; _text = format ["%1 %2","<t size='1'>" + "Altitude:" + "</t>" + "<br />", _altitude]; _dsp = [_text, 0.01, 0.01, 0] call bis_fnc_dynamicText; }; Edited September 21, 2014 by Iceman77 Share this post Link to post Share on other sites
iceman77 18 Posted September 21, 2014 (edited) I wrote you a toggleable altimeter. You can simply add or merge the contents of the example mission into your own. Let me know if there are issues. Cheers. Edited September 21, 2014 by Iceman77 Share this post Link to post Share on other sites
csk222 23 Posted September 22, 2014 Thank you very much it works great. Is there any way to reposition the watch over to the left or right? Once you deploy your chute the watch stays permanently on and blocks the center of the screen. Share this post Link to post Share on other sites
iceman77 18 Posted September 22, 2014 No way to reposition it on the fly as is. You can only toggle the watch off and on atm. Share this post Link to post Share on other sites
csk222 23 Posted September 22, 2014 (edited) I don't really need to reposition it on the fly. If it is in a fixed location of the screen i.e. upper right corner under the ammo count would be a good spot. Note: Other small but not necessary suggestion, could the notification be in a hint instead or could it be removed altogether? Thank you, I very much appreciate the help and work you've done. --- Update: I made the following simple changes. The repositioning on the screen is beyond me. [] spawn { if (isDedicated) exitWith {}; waitUntil {!isNull player && {time > 0}}; toggleOn = 0; _xIDx = player addAction ["Toggle Altimeter", { if (toggleOn == 0) then { //player sideChat "Altimeter Opened"; <<<---Not needed, It's obvious the watch is on screen toggleOn = 1; _xAltHudx = [player] call ICE_FNC_iceAltHUD; } else { //player sideChat "Altimeter Closed"; <<<--- Not needed toggleOn = 0; ("ICE_Alt_Layer" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; }; }, [], 6, false, true, "", "getposATL _target select 2 >= 2"]; _xEHx = player addEventHandler ["respawn", { toggleOn = 0; _xIDx = player addAction ["Toggle Altimeter", { if (toggleOn == 0) then { //player sideChat "Altimeter Opened"; //<<<--- Not needed toggleOn = 1; _xAltHudx = [player] call ICE_FNC_iceAltHUD; } else { //player sideChat "Altimeter Closed"; //<<<--- Not needed toggleOn = 0; ("ICE_Alt_Layer" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; }; }, [], 6, false, true, "", "getposATL _target select 2 >= 2"]; }]; while {true} do { waitUntil {getposATL player select 2 > 10}; //<<<--- I raised it because when you walk up on to a high rock, it would trigger the altimeter enabled message Hint "Altimeter Enabled"; waitUntil {getposATL player select 2 <= 2}; Hint "Altimeter Disabled"; }; }; Edited September 23, 2014 by csk222 Share this post Link to post Share on other sites
iceman77 18 Posted September 23, 2014 //<<<--- I raised it because when you walk up on to a high rock, it would trigger the altimeter enabled message Hmmm. Don't huge rocks count as terrain BI?! Ahh well. Share this post Link to post Share on other sites
csk222 23 Posted September 24, 2014 (edited) I changed the position of the altimeter to the upper left corner. class Controls { class HUD_alt_PIC : IceBasePictureHUD { text = "images\watch.paa"; idc = -1; x = 0.1 * safezoneW + safezoneX; y = 0.1 * safezoneH + safezoneY; w = 0.25 * safezoneW; h = 0.25 * safezoneH; }; class HUD_Alt : IceBaseTextHUD { text = ""; idc = 720500; sizeEx = "0.03 / (getResolution select 5)"; x = 0.190 * safezoneW + safezoneX; y = 0.205 * safezoneH + safezoneY; w = 0.06 * safezoneW; h = 0.03 * safezoneH; }; class HUD_time : IceBaseTextHUD { text = ""; idc = 720501; sizeEx = "0.015 / (getResolution select 5)"; x = 0.2 * safezoneW + safezoneX; y = 0.238 * safezoneH + safezoneY; w = 0.04 * safezoneW; h = 0.02 * safezoneH; }; Once again thank you very much for this. Here are some images.http://steamcommunity.com/sharedfiles/filedetails/?id=318044926 http://steamcommunity.com/sharedfiles/filedetails/?id=318044913 http://steamcommunity.com/sharedfiles/filedetails/?id=318044905 http://steamcommunity.com/sharedfiles/filedetails/?id=318044895 Edited September 6, 2016 by csk222 Share this post Link to post Share on other sites