pierremgi 4940 Posted November 22, 2017 Hi all, If you used to play on Kunduz, Afghanistan map, you remarked the doors of any building are not active. Here is a simple code to add in initPlayerLocal.sqf to make them work. (Create it in mission root if missing) if (modParams ["@Kunduz, Afghanistan", ["active"]] param [0,false]) then { inGameUISetEventHandler ["action"," private _intersects = []; if (_this select 4 == 'Close Door' or _this select 4 == 'Close Window') then { _anims = 'true' configClasses (configfile >> 'CfgVehicles' >> typeof cursorObject >> 'AnimationSources') apply {configName _x}; { _intersects = ([cursorObject, _x] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); if (count (_intersects select 0) > 0) exitwith {_intersects} } forEach ['VIEW','GEOM','FIRE']; if (count _intersects > 0) then { _select_door = (_intersects select 0) select 0; { if (count _anims > 0 && {[_select_door,_x] call Bis_fnc_inString}) exitWith { cursorObject animateSource [_x, 0];true}; false } forEach _anims; }; }; if (_this select 4 == 'Open Door' or _this select 4 == 'Open Window') then { _anims = 'true' configClasses (configfile >> 'CfgVehicles' >> typeof cursorObject >> 'AnimationSources') apply {configName _x}; { _intersects = ([cursorObject, _x] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]); if (count (_intersects select 0) > 0) exitwith {_intersects} } forEach ['VIEW','GEOM','FIRE']; if (count _intersects > 0) then { _select_door = (_intersects select 0) select 0; { if (count _anims > 0 && {[_select_door,_x] call Bis_fnc_inString}) exitWith { cursorObject animateSource [_x, 1];true};false } forEach _anims; }; }; "]; }; Have fun on this beautiful map. Updated Nov. 20th 2018 (see comments) 3 1 Share this post Link to post Share on other sites
Midnighters 152 Posted November 22, 2017 Excellent, thanks for the share. Share this post Link to post Share on other sites
Gunter Severloh 4075 Posted November 20, 2018 Late reply but i would like to add that there is a fixed door version of Kunduz available on the workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1188303655 2 Share this post Link to post Share on other sites
pierremgi 4940 Posted November 21, 2018 I tested your link. It's a good news that people can use this great map without worrying for extra script. I'll just keep this thread as is until the new map is shrunk (binarized) and signed. A 1 Go + signed map can be preferred to a 1.5 Go non-signed one. I'm looking for a script detecting which map is used (Kunduz or Kunduz - Fixed doors), while in game. More exactly, one of these values: publishedid = 0; name = "Kunduz, Afghanistan - Fixed Doors"; in meta.cpp located in the addOn folder. These data seem to be the workable differences between the two maps. I looked for cfgWorlds or some cfgVehicles for houses. I didn't find any difference between the 2 maps. configsourceModList and configSourceAddonList don't help here. My aim is to check what map is loaded then run or not this script. Share this post Link to post Share on other sites
HazJ 1289 Posted November 21, 2018 @pierremgi Maybe this will help. https://community.bistudio.com/wiki/modParams 1 Share this post Link to post Share on other sites
pierremgi 4940 Posted November 21, 2018 8 minutes ago, HazJ said: @pierremgi Maybe this will help. https://community.bistudio.com/wiki/modParams Thanks.These mods are same in regard their mod.cpp. Both returning: name = "Kunduz, Afghanistan"; picture = "\pra3\pra3_kz\data\icons\kunduz_icon_ca.paa"; actionName = "Forums"; action = "https://forums.bistudio.com/topic/177230-kunduz-afghanistan-10km-v1x/"; description = "Kunduz, Afghanistan"; logo = "\pra3\pra3_kz\data\icons\kunduz_logo_ca"; logoOver = "\pra3\pra3_kz\data\icons\kunduz_logoOver_ca"; tooltip = "Kunduz"; tooltipOwned = "Kunduz, Afghanistan Owned"; overview = "With over one year of work and many failed attempts I'd like to thank Bohemia Interactive, contributors and the Arma 3 terrain modding community for their part in the successful completion of this terrain."; author = "James2464"; overviewPicture = "\pra3\pra3_kz\data\icons\kunduz_icon_ca.paa"; But... Once again the KK's comment was helpful! In fact, the check returns true for: modParams ["@Kunduz Afghanistan - Fixed Doors", ["active"]] param [0,false] // for the map with fixed door and modParams ["@Kunduz, Afghanistan", ["active"]] param [0,false] // for the old one. Note the @ seems to be mandatory here. (copy/paste the folder from the rpt file). Note: Tested on server hosted + client: players can have any version of this map. That works. With the @Kunduz, Afghanistan one, the players will run my script. 1 Share this post Link to post Share on other sites
Gunter Severloh 4075 Posted November 21, 2018 15 hours ago, pierremgi said: I'm looking for a script detecting which map is used (Kunduz or Kunduz - Fixed doors), while in game. We should see if we can contact James and see if he can give us permission to fix these little aspects of the map that are needed, and reupload. 2 Share this post Link to post Share on other sites