thy_ 164 Posted February 13, 2022 How can I identify only land vehicles when they approach specific class names from an array? I wouldn't like to use given ID names to identify objects as "obj01", but use the object class name as "Land_RepairDepot_01_civ_F". My idea is just to drag and drop in Eden Editor that kind of object and the script does what it must do. I'm reading about these things but I need some kickoff help from you guys. typeOf - https://community.bistudio.com/wiki/typeOf isKindOf - https://community.bistudio.com/wiki/isKindOf BIS_fnc_objectType - https://community.bistudio.com/wiki/BIS_fnc_objectType I've found this relationship somewhere: "CfgVehicles" "All" "AllVehicles" "Land" "LandVehicle" "Car" "Car_F" "Wheeled_APC_F" Share this post Link to post Share on other sites
Jackal326 1181 Posted February 13, 2022 I'm no scripter but browsing the links you provided I also stumbled across inheritsFrom which may somehow serve your purpose. Scratch the above, I don't think it would help you. Share this post Link to post Share on other sites
thy_ 164 Posted February 13, 2022 Yeah, I keep reading and trying to turn my programming limitations hehe.. so the question is How can I populate my _arrayStations with only those objects in _arrayStationClasses dropped in Eden Editor? _arrayStationClasses = ["Land_RepairDepot_01_civ_F","Land_RepairDepot_01_green_F","Land_RepairDepot_01_tan_F"]; //classes array _arrayStations = []; { _arrayStations = _arrayStations + //HOW CAN I POPULATE MY _arrayStations WITH ONLY THOSE OBJECTS IN _arrayStationClasses DROPPED IN EDEN EDITOR? } forEach _arrayStationClasses; Share this post Link to post Share on other sites
thy_ 164 Posted February 14, 2022 3 hours ago, thy_ said: How can I populate my _arrayStations with only those objects in _arrayStationClasses dropped in Eden Editor? I got it with https://community.bistudio.com/wiki/allMissionObjects So... _arrayStationClasses = ["Land_RepairDepot_01_civ_F","Land_RepairDepot_01_green_F","Land_RepairDepot_01_tan_F"]; //classes array _arrayStations = []; // lets populate it! { // lets find out only the objects of classnames listed in _arrayStationClasses throught the allMissionsObjects array. _arrayStations = _arrayStations + allMissionObjects _x; } forEach _arrayStationClasses; //repeat the search for each classename into the _arrayStationClasses. While {true} do { { if ((player distance _x) < 10) then // if the player get close to any repair station with its classname listed above, so... { hint "Yeah, I'm in a station!" }; } forEach _arrayStations; sleep 2; }; Share this post Link to post Share on other sites
thy_ 164 Posted July 12, 2022 Here I am back! Finally, I have finished the idea and built it as an applicable script for everyone: There, you will get how I am identifying kinds of objects automatically, with no code on Eden Editor, even triggers. Hope it might help someone. 1 Share this post Link to post Share on other sites