Search the Community
Showing results for tags 'ai movement'.
Found 3 results
-
Hello, I'm doing a mission where there is an empty UAV (that new badass helicopter :D) and in case it's needed, I have a script that creates a crew, set a combat mode and the skill of the helo, but I can't get the uav the follow me... It's a transport helicopter mission so it's here to "defend" me. The actual script: _drone = d1; createVehicleCrew _drone; _drone setCombatMode "RED"; _drone setskill 1; while {alive _drone} do { _drone move getpos player; // _wp = group _drone addWaypoint [position h1, 0]; // _wp setWaypointType "LOITER"; // _wp setWaypointLoiterType "CIRCLE_L"; // _wp setWaypointLoiterRadius 100; sleep 2; }; The _wp variable it's something I've tried that didn't worked neither...
- 20 replies
-
Vehicles as Support Modules Movement on start
JimiFigs posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I don't know what I'm doing or not doing but I have this strange thing happening. I'm just starting to learn the editor and am currently fiddling around with support modules and noticed something rather strange, at least to me. So I have placed two Comanche helicopters for helicopter attack support, lets say helo 1 and helo 2. I have helo 1 synced to the support module and helo 2 synced to helo 1. The issue is that when the scenario starts helo 1 does what it should, sits there with the engine off and waits for me to place a support request and then takes off and goes to the coordinates, however helo 2 fires the engines up, takes off and hovers above the base until i call in support at which point it follows helo 1. This happens when using vehicle artillery as well, vehicle one stays put while vehicle two roams around. How do I get them to stay put until I put in a support request?- 12 replies
-
- support module
- support modules
-
(and 3 more)
Tagged with:
-
So, I'm having some serious problems with agents. Objectives: 1. Spawn 200 fish near three markers 2. Have the fish roam freely about within around 100m of the marker. 3. Have fish visible on all clients simultaneously. I've tested performance, and there's no impact from the initial 600 fish that get generated... the problem I have is, they all swim north continuously, and no matter what I script in, the fish don't respond in any way. The monitor script then sees that there aren't 200 fish near the markers anymore, so spawns another 200 fish... For reference, these are both executed on the server only. /* filename: fn_generateFish.sqf Author: Stevo Description: Generates additional fish at server startup */ Private ["_fish","_markers","_fishIndex","_markerPos","_fishExist","_fishCount","_index","_type","_posDiff1","_posDiff2","_fishPos","_newFish"]; _fish = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F"]; _fishIndex = 6; _markers = ["m_fish_1","m_fish_2","m_fish_3"]; { _marker = _x; _markerPos = getMarkerPos _x; _fishExist = nearestObjects [_markerPos, _fish, 125, false]; _fishCount = count _fishExist; if (_fishCount < 200) then { while {_fishcount < 200} do { _index = round(random(_fishIndex)); _type = _fish select _index; _posDiff1 = round(random(25)); _posDiff2 = round(random(25)); if (round(random(1)) == 0) then { _posDiff1 = (_posDiff1 - _posDiff1) - _posDiff1; }; if (round(random(1)) == 0) then { _posDiff2 = (_posDiff2 - _posDiff2) - _posDiff2; }; _fishPos = [(_markerPos select 0) + _posDiff1, (_markerPos select 1) + _posDiff2, (_markerPos select 2) - 5]; _newfish = createAgent [_type, _fishPos,[],0,"NONE"]; _newFish setVariable ["BIS_fnc_animalBehaviour_disable",true]; _newFish disableAI "FSM"; _newFish setVariable ["home",_marker]; _newFish enableSimulation true; _newFish allowDamage true; _fishCount = _fishCount + 1; }; }; } forEach _markers; [] spawn life_fnc_monitorFish; /* filename: fn_monitorFish.sqf Author: Stevo Description: Recreates fish that have been "caught" in another location. */ Private ["_markers"]; _markers = ["m_fish_1","m_fish_2","m_fish_3"]; { [_x] spawn { Private ["_fish","_marker","_fishIndex","_markerPos","_fishExist","_fishCount","_index","_type","_posDiff1","_posDiff2","_fishPos","_newFish"]; _fish = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F"]; _fishIndex = 6; _marker = _this select 0; _markerPos = getMarkerPos _marker; while {true} do { sleep 600; _fishExist = nearestObjects [_markerPos, _fish, 125, false]; _fishCount = count _fishExist; if (_fishCount < 200) then { while {_fishcount < 200} do { _units = []; _index = round(random(_fishIndex)); _type = _fish select _index; _tooNear = true; while {_tooNear} do { _posDiff1 = round(random(100)); _posDiff2 = round(random(100)); if (round(random(1)) == 0) then { _posDiff1 = (_posDiff1 - _posDiff1) - _posDiff1; }; if (round(random(1)) == 0) then { _posDiff2 = (_posDiff2 - _posDiff2) - _posDiff2; }; _fishPos = [(_markerPos select 0) + _posDiff1, (_markerPos select 1) + _posDiff2, (_markerPos select 2) - 5]; { if (_x distance2D _fishPos < 20) then {_units pushBack _x;}; } forEach playableUnits; if (count _units != 0) then {_tooNear = true} else {_tooNear = false}; }; _newfish = createAgent [_type, _fishPos,[],0,"NONE"]; _newFish setVariable ["home",_marker]; _newFish enableSimulation true; _newFish allowDamage true; _fishCount = _fishCount + 1; }; }; }; }; } forEach _markers; while {true} do { { _marker = _x getVariable ["home","m_fish_1"]; _pos = [(getMarkerPos _marker) select 0,(getMarkerPos _marker) select 1,-1]; if (_x distance2D _pos > 100) then { _x MoveTo _pos; }; } forEach entities "Fish_Base_F"; sleep 10; };
- 1 reply
-
- ai movement
- agents
-
(and 2 more)
Tagged with: