Jump to content
Sign in to follow this  
Pac Man

Set button action on the fly?

Recommended Posts

i need to be able to do this. below is an example of what im after.

class pac_button_tester: RscButton
{
	idc = 9000
	text = "button1";
	x = 0.4008 * safezoneW + safezoneX;
	y = 0.5812 * safezoneH + safezoneY;
	w = 0.0977 * safezoneW;
	h = 0.028 * safezoneH;
	action = ""; // none yet... 
};

class pac_button_tester2: RscButton
{
	idc = -1
	text = "button2";
	x = 0.4008 * safezoneW + safezoneX;
	y = 0.5900 * safezoneH + safezoneY;
	w = 0.0970 * safezoneW;
	h = 0.0280 * safezoneH;
	action ="execVM 'script.sqf'";
};

script.sqf

//pseudo 
CTRLSETACTION [9000, "execVM 'anotherScript.sqf'"];

Share this post


Link to post
Share on other sites

fantastic thanks. i was too focused on the prefix ctrl in my researches hehe. :p

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  

×