Jump to content
Sign in to follow this  
eagledude4

User Actions and hidden selections

Recommended Posts

I made a sign with two hidden selections which would be triggered by the player.

class CfgVehicles {
class NonStrategic;	// External class reference

class TempLEDConstructionSignBase : NonStrategic {
	scope = public;
	vehicleClass = "MC_Objects";
	displayName = "Temporary Led Construction Sign";
	model = "mc_objects\signs\construction signs\temporary led sign\templedconstructionsign.p3d";
	armor = 9999;
	cost = 0;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	destrType = 0;
	mapSize = 0;
	class UserActions {
		class Left {
			showWindow = 0;
			hideOnUse = 1;
			displayName="Turn on left arrow";
			position="action";
			radius=0.10000;
			onlyForPlayer = 1;
			condition="(alive this)";
			statement="hiddenSelections[]={"Left"};";
		};
		class Right {
			showWindow = 0;
			hideOnUse = 1;
			displayName="Turn on Right arrow";
			position="action";
			radius=0.10000;
			onlyForPlayer = 1;
			condition="(alive this)";
			statement="hiddenSelections[]={"Right"};";
		};
	};		
	class eventhandlers {
		init = "_this allowDamage false;";
	};
};

class TempLedConstructionSignLeft : TempLEDConstructionSignBase {
	displayName = "Temporary Led Construction Sign (Left)";
	hiddenSelections[]={"Left"};
};

class TempLedConstructionSignRight : TempLEDConstructionSignBase {
	displayName = "Temporary Led Construction Sign (Right)";
	hiddenSelections[]={"Right"};
};
};

class TempLedConstructionSignLeft : TempLEDConstructionSignBase {
	displayName = "Temporary Led Construction Sign (Left)";
	hiddenSelections[]={"Left"};
};

class TempLedConstructionSignRight : TempLEDConstructionSignBase {
	displayName = "Temporary Led Construction Sign (Right)";
	hiddenSelections[]={"Right"};
};

model.cfg:

class CfgSkeletons {
   class NonStrategic;

   class SignBones : NonStrategic {
       isDiscrete = 1;
       skeletonInherit = "";
       skeletonBones[] = {"Left", "", "Right", ""};
   };
};

class CfgModels {
   class NonStrategic;

   class Sign : NonStrategic {
   sectionsInherit = "";
   sections[] = {""};
   skeletonName = "SignBones";
   };
};

I realize most of this is incorrect, I was just trying to relay my point across. The goal is to allow the player to switch between the two hidden selections by showing/hiding faces.

Share this post


Link to post
Share on other sites

eagledude4

Please do not crosspost.

§9) Do not cross-post

Do not post duplicate threads in more than one forum simply to get an answer quicker or to draw more attention to your post.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×