Jump to content

Recommended Posts

I am using the following script for an inventory interaction system that passes a classname to another script. Problem is, I'd like to include some ACE items in this interaction, but as far as I can tell, lbData does not work for anything in CfgWeaons (which includes all ACE items). Instead of returning the classname, it returns nothing. Can anyone explain what's going on with this and how I might get it to work? 

 

handle = [] spawn { 

   fnc_test = { 
    _idc = ctrlIDC (_this select 0); 
    _selectedIndex = _this select 1;
    _data = format ["%1",lbData [_idc, _selectedIndex]];
	
	hint format ["%1", _data];
	[_data] execVM 'use_item.sqf';
    false 
   }; 
   
   while {true} do { 
       waituntil {!(isnull (finddisplay 602))}; 
       ((findDisplay 602) displayCtrl 633) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; 
       ((findDisplay 602) displayCtrl 638) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"];
	   ((findDisplay 602) displayCtrl 619) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"];
	   waituntil {isnull (finddisplay 602)}; 
   }; 
}; 

Share this post


Link to post
Share on other sites

Seems like magazines are the only items that get lbData to be set. Nearly everything in the inventory UI is handled by the engine so it's hard to work with...

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

×