Jump to content
Sign in to follow this  
Josh79

Join a unit (selected from a listbox) to a group

Recommended Posts

hi there,

i´m trying to let a unit that has been selected from a listbox in a dialog join to the selector´s group.

so i create a dialog that has been defined in the description.ext by adding an addaction to the player.

by first selecting the unit in the listbox from the dialog and then clicking a button i execute the join script.

dialog:

class listboxA: RscListBox 
{
	idc = 10002;
	x = 0.4;
	y = 0.5;
	w = 0.2;
	h = 0.2;
};
class T_BUTTONJ: RscButton
     {
      idc = -1;
      text = "JOIN";
      x = 0.4 * safezoneW + safezoneX;
      y = 0.7 * safezoneH + safezoneY;
      w = 0.08 * safezoneW;
      h = 0.04 * safezoneH;
             action = "_nil=[]ExecVM ""join.sqf""";
};

join script:

hint "Joined";
lbData [10002, lbCurSel 10002] join (group P1);  
exit

(i´m also trying to get this to work in multiplayer, but i dont know what has to be changed... local variables and global ones...)

thanx for your help

cheers josh

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  

×