Coladebote 46 Posted August 12, 2019 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _markerstr = createMarker ["ARMORED_1",[4570.69,21463.7]]; _markerstr setMarkerShape "ICON"; _height = 0; _pos = getMarkerPos "ARMORED_1"; _ARMORED_1 = [ [_pos select 0, _pos select 1, _height], EAST, ["O_APC_Tracked_02_cannon_F"],[],[],[],[],[],75] call BIS_fnc_spawnGroup; { group _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x forceSpeed 0; _x setBehaviour "STEALTH"; _x setCombatMode "RED"} forEach units ARMORED_1; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Hi guys: With this little script I generate an armored car in one position. The vehicle must remain at that point, defending it. It should not move (_x forceSpeed 0). But as soon as the hostilities begin, he leaves the point and goes to look for enemies. Something very ridiculous because it bumps into everything. I am doing something wrong? Surely yes. A little help please. Thanks. Share this post Link to post Share on other sites
Maff 251 Posted August 12, 2019 Try giving the APC a hold waypoint. That should do it. _wp = ARMORED_1 addWaypoint [_pos, 0]; _wp setWaypointType "HOLD"; _wp setWaypointBehaviour "STEALTH"; _wp setWaypointCombatMode "RED"; 1 Share this post Link to post Share on other sites
wogz187 1086 Posted August 12, 2019 But to be sure, ARMORED_1 disableAI "PATH";// can still rotate 2 Share this post Link to post Share on other sites
Coladebote 46 Posted August 12, 2019 There is an error here: forEach units ARMORED_1; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _markerstr = createMarker ["ARMORED_1",[4570.69,21463.7]]; _markerstr setMarkerShape "ICON"; _height = 0; _pos = getMarkerPos "ARMORED_1"; _ARMORED_1 = [ [_pos select 0, _pos select 1, _height], EAST, ["O_APC_Tracked_02_cannon_F"],[],[],[],[],[],75] call BIS_fnc_spawnGroup; { group _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x forceSpeed 0; _x setBehaviour "STEALTH"; _x setCombatMode "RED"} forEach units _ARMORED_1; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// With this script, the armored vehicle starts the engine, tries to move, but cannot. Tomorrow I will take a look at those suggestions. Bedtime. Thank you. Share this post Link to post Share on other sites
Maff 251 Posted August 12, 2019 19 minutes ago, Coladebote said: There is an error here: forEach units ARMORED_1; // Removed group from _x enableAI "TARGET"; { _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x forceSpeed 0; _x setBehaviour "STEALTH"; _x setCombatMode "RED"} forEach units _ARMORED_1; Share this post Link to post Share on other sites
Coladebote 46 Posted August 12, 2019 I could not wait for tomorrow. With the corrections indicated, it seems functional well. The little script would look like this: ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _markerstr = createMarker ["ARMORED_1",[4570.69,21463.7]]; _markerstr setMarkerShape "ICON"; _height = -3.05176e-005; _pos = getMarkerPos "ARMORED_1"; _ARMORED_1 = [ [_pos select 0, _pos select 1, _height], EAST, ["O_APC_Tracked_02_cannon_F"],[],[],[],[],[],75] call BIS_fnc_spawnGroup; {_x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x disableAI "PATH"; _x setBehaviour "STEALTH"; _x setCombatMode "RED"} forEach units _ARMORED_1; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Thanks Share this post Link to post Share on other sites