Jump to content

Recommended Posts

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

_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

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";

 

  • Like 1

Share this post


Link to post
Share on other sites

But to be sure,

ARMORED_1 disableAI "PATH";// can still rotate

 

  • Like 2

Share this post


Link to post
Share on other sites

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
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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×