Jump to content
Sign in to follow this  
hellstorm77

Crew Info in vehicles

Recommended Posts

Did a little bit of work on my version...

We now have, vehicle turret azimuth and vehicle turret target displays..

Also placed it into a dialog.. You have the option of either left or right for the dialog. In the description.ext file, change the RSC Titles to either namesright.hpp or namesleft.hpp..

Messed around with the text colours as well...

Inside

2zegr43.jpg

Link for download..

http://www34.zippyshare.com/v/47750725/file.html

Oops...

Forgot to thanks Blakeace for the use of his code that displays the azimuth. I have already used that to great effect within my FLIRcam script for the Little Birds..

Also, thanks to everyone on the community for all the little bits of info that make scripts work.. Without it, I would be dead in the water..

Share this post


Link to post
Share on other sites

Updated version coming soon.

Which will get rid of the targets of buildings etc.

Share this post


Link to post
Share on other sites

i get a weird error when i try to put it in my mission

domi.Stratis\dialogs\namesleft.hpp, line 9: /HudNames/controlsBackground.HudNames_1: Undefined base class 'RscStructuredText

---------- Post added at 23:25 ---------- Previous post was at 23:04 ----------

silly me i got it working

Share this post


Link to post
Share on other sites

Kinda updated version...

Still working on getting rid of an error of no picture showing, only happens once.

Displays name of target and also icon of vehicle type..

Original script and mission. http://www.armaholic.com/page.php?id=20121

rhsaj9.jpg


// Vehicle Info Crew Script By : MarKeR. Thanks to Blakeace for azimuth code usage. Also XxAnimusxX for showing me a couple of errors.   
// Vehicle Crew and Target HUD for ARMA 3. Should work with ARMA 2 with a change of icon path for driver, gunner and cargo.
// For use with script download from  http://www.armaholic.com/page.php?id=20121    save and replace crew.sqf


Private ["_name","_vehicle","_vehname","_weapname","_weap","_target","_picture","_vehtarget","_azimuth","_wepdir","_hudnames","_ui"];   

disableSerialization;
 while {true} do  {

  	 1000 cutRsc ["HudNames","PLAIN"];
  	 _ui = uiNameSpace getVariable "HudNames";
	 _HudNames = _ui displayCtrl 99999;

   if(player != vehicle player) then
   {
       _name = "";
       _vehicleID = "";
       _picture = ""; 
       _vehicle = assignedVehicle player;
       _vehname= getText (configFile >> "CfgVehicles" >> (typeOf vehicle player) >> "DisplayName");
       _weapname = getarray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "Turrets" >> "MainTurret" >> "weapons"); 
       _weap = _weapname select 0;
       _name = format ["<t size='1.25' color='#556b2f'>%1</t><br/>", _vehname];



       {
           if((driver _vehicle == _x) || (gunner _vehicle == _x)) then
           {

               if(driver _vehicle == _x) then
               {

                   _name = format ["<t size='0.85' color='#f0e68c'>%1 %2</t> <img size='0.7' color='#6b8e23' image='a3\ui_f\data\IGUI\Cfg\Actions\getindriver_ca.paa'/><br/>", _name, (name _x)];
               }

               else
               {

            _target = cursorTarget;

            if (_target isKindOf "Car" || _target isKindOf "Motorcycle" || _target isKindOf "Tank" || _target isKindOf "Air" || _target isKindOf "Ship") then

      		{
      			_vehicleID = getText (configFile >> "cfgVehicles" >> typeOf _target >> "displayname");		             
      			_picture = getText (configFile >> "cfgVehicles" >> typeOf _target >> "picture");
     		};

              _wepdir =  (vehicle player) weaponDirection _weap;
		  _Azimuth = round  (((_wepdir select 0) ) atan2 ((_wepdir select 1) ) + 360) % 360;
                   _name = format ["<t size='0.85' color='#f0e68c'>%1 %2</t> <img size='0.7' color='#6b8e23' image='a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa'/><br/> <t size='0.85' color='#f0e68c'>Heading :<t/> <t size='0.85' color='#ff0000'>%3</t><br/><t size='0.85' color='#f0e68c'> Target :<t/> <t size='0.85' color='#ff0000'>%4</t><br/><t size='0.85' color='#f0e68c'> Display : </t><t size='0.85' color='#f0e68c'><img size='1' image='%5'/></t><br/>", _name, (name _x), _Azimuth,_vehicleID, _picture];

                };

           }
           else
           {
               _name = format ["<t size='0.85' color='#f0e68c'>%1 %2</t> <img size='0.7' color='#6b8e23' image='a3\ui_f\data\IGUI\Cfg\Actions\getincargo_ca.paa'/><br/>", _name, (name _x)];
           };  

       } forEach crew _vehicle;



     	_HudNames ctrlSetStructuredText parseText  _name;
     	_HudNames ctrlCommit 0;


   	};
   sleep 1;
 };  

Edited by marker

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×