Jump to content

Search the Community

Showing results for tags 'nearestobjects'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • Mercurious Brotherhood +2347063372861's +2347063372861>> I WANT TO JOIN OCCULT FOR MONEY RITUAL
  • 123betcasino01's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 9 results

  1. Hello Guys, I am Really suffering a little bit. There is a small complicated problem where i don't understand how i am going to do this, here is my question: How Can I Activate a Trigger by Going near someone or a unit or Object with distance limit like code: (blablabla) > 5 or (blablabla) < 5; and how to set Position of a unit near Object with distance from him.
  2. HI All, I'm trying to write a script that spawns units in a nearby building (like houses, farms, hangers, anything with a roof and door), but don't want them to spawn on telephone lines or electrical lines or any weird stuff... #1 I thought BIS_fnc_isBuildingEnterable would help filter these type of buildings out, but it didn't...how can I avoid spawn from these types of places? Here is my script. #2 Also, I keep getting a "Error undefined variable in expression: _building" on line 50, whenever my player leaves by 250m, but thought I defined it? Any ideas how to solve these 2 problems? thanks onMapSingleClick "player setPosATL _pos"; _civilianCount = 0; _nearbyLocations = []; _buildingArray = []; _realBuildingArray = []; while {true} do { sleep 3; waitUntil { // find "Building" near player to spawn civilians _buildingArray = nearestObjects [player, ["House"], 250]; { if ([_x, 3] call ) then {_realBuildingArray pushBackUnique _x}; } forEach _buildingArray; // player is near a location _building = objNull; if !(_realBuildingArray isEqualTo []) then { _realBuildingArray = nearestObjects [player, ["House"], 250]; _building = _realBuildingArray select ((floor random (count _buildingArray)) + 1); systemChat format ["_building: %1", typeOf _building]; // create groups of civilians _grp = createGroup civilian; for "_i" from 1 to floor random 6 do { _unit = _grp createUnit ["C_scientist_F", _building, [], 0, "NONE"]; _wp =_grp addWaypoint [position player, 10]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "LIMITED"; // spawn function for groups to keep moving to player then return then get deleted [_unit, _grp, _wp, _realBuildingArray] spawn { params ["_unit", "_grp", "_wp", "_realBuildingArray"]; waitUntil { sleep 3; // new waypoint for player that moves if ((player distance2D waypointPosition _wp) > 5) then { _wp =_grp addWaypoint [position player, 5]; _grp setCurrentWaypoint _wp; }; ( ((_unit distance2D player) < 10) or ((player distance2D _unit) > 250) ) }; // select building to return to _building = objNull; if !(_realBuildingArray isEqualTo []) then { _building = _realBuildingArray select ((floor random (count _realBuildingArray)) + 1); _wp =_grp addWaypoint [_building, 0]; _grp setCurrentWaypoint _wp; }; // return to building and get deleted waitUntil { sleep 3; (((_unit distance2D waypointPosition _wp) < 2) or ((player distance2D _unit) > 250) ) }; deleteVehicle _unit; }; }; sleep floor random 5; }; }; };
  3. I am currently trying to make it so that when a hold action is preformed on a crate, it will put the crate in the back of a non specific Zamak Truck. Currently, it will put the crate in the nearest Zamak Truck (destroyed or alive). I need it to only pick the closest alive Zamak Truck. I've tried loads of different methods, but I'm now quite stuck. Please help! This is my script so far, all working fine. [ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ]; if ( count _ZamakTrans > 0 ) then { target = ( _ZamakTrans select 0 ); _lockIndexes = [ 2, 3, 4, 5, 6, 7 ]; { if ( ( _x select 2 ) in _lockIndexes ) then { moveOut ( _x select 0 ) }; } forEach fullCrew target; { target lockCargo [ _x, true ]; } forEach _lockIndexes; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; What I need is to pick the closest alive Zamak Truck, not just the closest one. (any advice/criticism on my script will be greatly appreciated.)
  4. Okay so I need help with coding a helicopter pick up the nearest object that it can like an ATV for example how exactly can that be written into code some examples would be nice but I do need help on this. And also I have yet to find an example to work with to help me with this problem of mine.
  5. Hey! I'm trying to remove military objects on Altis using: _towers = nearestTerrainObjects[[worldSize/2,worldSize/2],[ "Land_Cargo_Tower_V2_F", "Land_Cargo_Tower_V1_F", "Land_Cargo_Tower_V3_F", "Land_HBarrier_3_F", "Land_HBarrier_5_F", "Land_HBarrier_Big_F", "Land_HBarrier_1_F", "Land_HBarrierWall_corridor_F", "Land_HBarrierWall_corner_F", "Land_HBarrierWall6_F", "Land_HBarrierTower_F", "Land_HBarrierWall4_F"],worldSize,false]; {hideObjectGlobal _x} forEach [_towers] without luck. (I know the list isn't complete with all objects but desert towers are still there). My question is: Is there even a way to do this in a mission file?
  6. Hey, so basically I'm looking for creating a marker on the map at the location of all plane wrecks on Tanoa. I have taken this script and changed the class name of the building to match with the plane wreck but this didn't work... Can you help me please? Thank's! _middle = worldSize/2; _spawnCenter = [_middle,_middle,0]; _maxDistance = _middle; _buildingTypes = ["Land_HistoricalPlaneWreck_02_front_F"]; { _buildingType = _x; _building = _spawnCenter nearObjects [_buildingType, _maxDistance]; { _foundBuilding = _x; _pos = _foundBuilding buildingPos 0; _location = getPosATL _foundBuilding; _marker = createMarker [format ["%1", _foundBuilding],_pos]; _marker setMarkerShape "Icon"; _marker setMarkerSize [1,1]; _marker setMarkerType "mil_dot"; _marker setMarkerBrush "Solid"; _marker setMarkerAlpha 0.5; _marker setMarkerColor "ColorRed"; _marker setMarkerText format["%1", _foundBuilding]; }forEach _building; }forEach _buildingTypes;
  7. Hello, I need a script to allow me to move a unit to the nearest object of a certain type. I believe the answer is nameofunit move {nearestobject [position nameofunit, "land_pencilred_f"]} I tried this with "land_pencilred_f" being the classname of the objects that I'd like my unit to move to the nearest pencil to his current location. No luck so far but any help is much appreciated :-)
  8. As the title suggest i am trying to get some position from arrays of the command "nearestObjects". I want the "nearestObjects" to look for a certain amount of house, so i can identify a village or town with the script and then use the average of all the listed house in the array. That way the position i am after will not be heavily affected by one or two houses caught in the calclated radius. _Center = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); _mapsize = (_Center select 0)*2; _RandomStartPos = [_Center, (_mapsize*0.77), (_mapsize*0.78), 3, 1, 20, 0] call BIS_fnc_findSafePos; sleep 1; player moveInCargo [_heli,5]; _enemySpawnPos = [_RandomStartPos, (_mapsize*0.7), _mapsize*0.71, 3, 0, 20, 0] call BIS_fnc_findSafePos; createMarker ["marker2",_enemySpawnPos]; "marker2" setMarkerShape "ELLIPSE"; "marker2" setMarkerSize [500,500]; "marker2" setMarkerText "Enemy resupply line"; "marker2" setMarkerAlpha 0.5; _findhouses = nearestObjects [_enemySpawnPos, "house"", (_mapsize*0.2)]; //small problems on this line _divide = count _findhouses; _fortifiedpos = _findhouses/_divide; //The bigger problem createMarker ["marker3",_fortifiedpos]; "marker3" setMarkerShape "ELLIPSE"; "marker3" setMarkerSize [500,500]; "marker3" setMarkerText "Enemy resupply line"; "marker3" setMarkerAlpha 0.5; I not really sure how should proceed, because i dont think the line "_fortifiedpos" will work, the problem above prevents it from execute. "nearestObjects" contains arrays of the houses and the houses also have arrays, if there isnt a command that would merge the arrays. If anyone have any input that would be nice, arrays are some a bit new to me so this is kind of over my head.
  9. I'm having a brain-fart with finding all nearest Blufor units around the player within a radius, INCLUDING units INSIDE vehicles. (Whether it be driver, gunner, passenger, etc.) I'm searching for nearby units like this: BLU=["B_Soldier_base_F","MRAP_01_base_F","Truck_01_base_F","MBT_01_base_F","LSV_01_base_F","B_APC_Wheeled_01_base_F","B_APC_Tracked_01_base_F","Heli_Light_01_base_F","Heli_Transport_01_base_F","Heli_Transport_03_base_F","Plane_CAS_01_base_F","Parachute_02_base_F","B_Boat_Transport_01_F","B_Boat_Armed_01_minigun_F","B_SDV_01_F"]; _n=nearestObjects[player,BLU,8192];_c=[]; {if((isAbleToBreathe _x)&&{(alive _x)&&(_x!=player)})then{_c set[(count _c),_x];};}forEach _n; The above code, even if "B_Soldier_base_F" is the only object being searched for, will not return units inside vehicles. It's possible that once a unit enters a vehicle, he is no longer "B_Soldier_base_F" until he dismounts, but I could definitely be wrong and overlooking something... [EDIT] Figured out a possible work around: BLU=["B_Soldier_base_F","MRAP_01_base_F","Truck_01_base_F","MBT_01_base_F","LSV_01_base_F","B_APC_Wheeled_01_base_F","B_APC_Tracked_01_base_F","Heli_Light_01_base_F","Heli_Transport_01_base_F","Heli_Transport_03_base_F","Plane_CAS_01_base_F","Parachute_02_base_F","B_Boat_Transport_01_F","B_Boat_Armed_01_minigun_F","B_SDV_01_F"]; _n=nearestObjects[player,BLU,WS];_c=[];_v=[]; {if((isAbleToBreathe _x)&&{(alive _x)&&(_x!=player)})then{_c set[(count _c),_x];};}forEach _n; {if((count(crew _x)>1)&&{(alive _x)&&(_x!=player)})then{_v set[(count _v),_x];};}forEach _n; _c=_c+_v; _c select 0; I think this should work. Still need to test it more.
×