durobulo@gmail.com 10 Posted July 1, 2017 Hi, I would like to know, how to get information about building type - such as military, industrial, civilian etc. I can read the building class (name) - but is there any function that returns what type it is? Or is it coded in building name? _nBuilding = nearestBuilding player; hint str typeOf _nBuilding; thnx Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 1, 2017 maybe the classname is part of a parent class which is categorized like u wish. You can use the configbrowser in eden and search for the classname. Thenn in the bottem right u see all of the objects parent classes. Share this post Link to post Share on other sites
durobulo@gmail.com 10 Posted July 1, 2017 Yep but I need this to be done by mission script itself. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 1, 2017 https://community.bistudio.com/wiki/inheritsFrom Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 1, 2017 this should be better: https://community.bistudio.com/wiki/BIS_fnc_returnParents Share this post Link to post Share on other sites
durobulo@gmail.com 10 Posted July 1, 2017 (edited) Many thanks - thats it. I am not just sure about proper syntax. Would it be: _parentbuilding = [ str typeOf _nBuilding, true] call BIS_fnc_returnParents; Many thanks Edited July 1, 2017 by durobulo@gmail.com syntax Share this post Link to post Share on other sites
sarogahtyp 1108 Posted July 1, 2017 I think it should be: [configfile >> "CfgVehicles" >> (typeOf _nBuilding), true] call BIS_fnc_returnParents; Share this post Link to post Share on other sites
durobulo@gmail.com 10 Posted July 1, 2017 Yep its working. Only problem is that the results for example military bunker on Malden are "house", "non strategic" "housebase" "building". :D Share this post Link to post Share on other sites
Larrow 2822 Posted July 1, 2017 _nBuilding = nearestBuilding player; _cfg = configFile >> "CfgVehicles" >> typeOf _nBuilding; _EdenCat = getText( _cfg >> "editorCategory" ); _EdenSubCat = getText( _cfg >> "editorSubcategory" ); if !( _EdenCat isEqualTo "" ) then { _EdenCat = getText( configFile >> "CfgEditorCategories" >> _EdenCat >> "displayName" ); }; if !( _EdenSubCat isEqualTo "" ) then { _EdenSubCat = getText( configFile >> "CfgEditorSubCategories" >> _EdenSubCat >> "displayName" ); }; hint format[ "%1 is in\n%2\n%3", typeOf _nBuilding, _EdenCat, _EdenSubCat ]; 2 Share this post Link to post Share on other sites
durobulo@gmail.com 10 Posted July 1, 2017 1 hour ago, Larrow said: _nBuilding = nearestBuilding player; _cfg = configFile >> "CfgVehicles" >> typeOf _nBuilding; _EdenCat = getText( _cfg >> "editorCategory" ); _EdenSubCat = getText( _cfg >> "editorSubcategory" ); if !( _EdenCat isEqualTo "" ) then { _EdenCat = getText( configFile >> "CfgEditorCategories" >> _EdenCat >> "displayName" ); }; if !( _EdenSubCat isEqualTo "" ) then { _EdenSubCat = getText( configFile >> "CfgEditorSubCategories" >> _EdenSubCat >> "displayName" ); }; hint format[ "%1 is in\n%2\n%3", typeOf _nBuilding, _EdenCat, _EdenSubCat ]; This is just PERFECT - many thanks to both of you. Share this post Link to post Share on other sites
bad benson 1733 Posted July 1, 2017 in comes Larrow with the super useful code snippet. as always @Larrow is there anything you haven't tried yet? i always wonder what you are working on when i see your posts. is it some super elaborate game mode or are you just playing around? Share this post Link to post Share on other sites
durobulo@gmail.com 10 Posted July 1, 2017 I do not know whet he is :D but I am just working on some game mode (mission) inspired by battle royalle mod. Amount of loot, circle size etc is balanced to amount of players playing. But the loot spawn works differently - doesn't spawn in every object and can be really rare. Usually it takes 2km walk to get a weapon. It is common to loot system in Dayz SA. VIP players can set the amount of loot in round from low, normal to high. There are enemy NPC so you can play it as singleplayer as well. VIP players can double NPC volume or switch them off and play just versus other players. Now players demande to spawn the loot according to building type - so I needed some help here. Edit: also I am working on loot damage system, when hit in player means, some his loot will became ruined (unusable). Share this post Link to post Share on other sites
Larrow 2822 Posted July 1, 2017 9 minutes ago, bad benson said: @Larrow is there anything you haven't tried yet? Lots of stuff. 10 minutes ago, bad benson said: i always wonder what you are working on when i see your posts. is it some super elaborate game mode or are you just playing around? Both, plus some Eden tools and systems for other peoples projects ( although I have not done any for a little while ). Very experimental 4 Share this post Link to post Share on other sites
bad benson 1733 Posted July 1, 2017 5 minutes ago, Larrow said: Lots of stuff. Both, plus some Eden tools and systems for other peoples projects ( although I have not done any for a little while ). Very experimental wait! the hint suggests it's inside arma? damn. nice work! Share this post Link to post Share on other sites
mad_cheese 593 Posted October 18, 2021 On 7/1/2017 at 2:54 PM, Larrow said: _nBuilding = nearestBuilding player; _cfg = configFile >> "CfgVehicles" >> typeOf _nBuilding; _EdenCat = getText( _cfg >> "editorCategory" ); _EdenSubCat = getText( _cfg >> "editorSubcategory" ); if !( _EdenCat isEqualTo "" ) then { _EdenCat = getText( configFile >> "CfgEditorCategories" >> _EdenCat >> "displayName" ); }; if !( _EdenSubCat isEqualTo "" ) then { _EdenSubCat = getText( configFile >> "CfgEditorSubCategories" >> _EdenSubCat >> "displayName" ); }; hint format[ "%1 is in\n%2\n%3", typeOf _nBuilding, _EdenCat, _EdenSubCat ]; At the risk of hurting the rules of this forum (necromancing this and that). I would like to take a moment to really appreciate @Larrow for being the absolute saint of Arma Coding. Not saying there is not anyone else who does this much, but this man has helped so many people here take their stuff to the next level. Thank you Larrow, from the heart ❤️ 2 Share this post Link to post Share on other sites