Jump to content
Sign in to follow this  
moach_mayhem

Construction interface events not responding

Recommended Posts

Hi, i´m trying to setup a simple construction interface...

im using this script to set up what´s available, categories, etc... all that works fine

but...

i also needed a hint to be displayed whenever a building is selected, and another function to remove a building from the list once it´s built (havent gotten that far yet)

the onSelect function simply doesn´t work... at all... what could i be missing?

have a look:

fieldSupplies = 150;

_builder = _this select 1;
_module = _this select 0;

_module setVariable ["BIS_COIN_name", "F.O.B. Construction"];
_module setVariable ["BIS_COIN_funds", "fieldSupplies"];
_module setVariable ["BIS_COIN_fundsdescription", "*"];

_module setVariable ["BIS_COIN_categories", ["Base Assets", "Field Gear", "Barriers"]];
_module setVariable ["BIS_COIN_areaSize", [100, 50]];

_gearArray = [];
_gearArray set [0, ["USMC_WarfareBBarracks","Base Assets",0,"F.O.B. Barracks"]];
_gearArray set [1, ["PowerGenerator","Base Assets",0,"Power Generator"]];
_gearArray set [2, ["FlagCarrierUSA","Base Assets",0,"Flag"]];


_nonOptional = "\n\nThis is a base asset, which means it´s necessary for the operation of this type of base";

//_builder sideChat "F.O.B. Ready to Deploy";


_module setVariable ["BIS_COIN_items", _gearArray];

_module setVariable ["BIS_COIN_onSelect", {

_builder sideChat "pluck...";
hint "pick!";

switch ((_this select 1)) do {

	case "USMC_WarfareBBarracks":{
		hint "BARRACKS\n\nBarracks allow infantry troops to spawn at this base" + _nonOptional;
	};

	case "PowerGenerator":{
		hint "POWER GENERATOR\n\n Your base needs power to be operational, this generator is enough for a small F.O.B." + _nonOptional;
	};

	case "FlagCarrierUSA":{
		hint "FLAG POLE\n\n This is to let everyone know to whom this territory belongs!"
	};

	default {
		hint "what the fuck??";
	}
};
];

the script is called on the init box of the construction module:

_naught = [this, buider] execVM "constructionSetup.sqf";

is there something i need to do to get these functions going?

any ideas of what could be messed up?

cheerz

Share this post


Link to post
Share on other sites
hint "what the fuck??";

}// where ;?

};//; not need here

];

Ðœay be syntax?

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  

×