Jump to content
Sign in to follow this  
1para{god-father}

bis_fnc_taskPatrol Not working ?

Recommended Posts

Having a little issue getting bis_fnc_taskPatrol to work , the plane just fly's to the bottom left of the map, not sure why ?

veh1 is a vehicle on the map and it does exits as I see the marker fine

_vehicleambush=veh1;

_ambush1 = createmarker ["ambush1",getpos _vehicleambush];
_ambush1 setmarkershape "ELLIPSE";
_ambush1 setmarkersize [220,220];
_ambush1 setMarkerColor "ColorRed";

_airSpawn1 = [[(_pos) select 0, (_pos select 1)- 30, 200], 0, "Su25_TK_EP1", EAST] call BIS_fnc_spawnVehicle;
[_airSpawn1, getPos _vehicleambush, 1000] call bis_fnc_taskPatrol;

Share this post


Link to post
Share on other sites

I then get

Error in expression <EP1", EAST] call BIS_fnc_spawnVehicle;
[group _airSpawn1, getPos _vehicleambush,>
 Error position: <group _airSpawn1, getPos _vehicleambush,>
 Error group: Type Array, expected Object

Share this post


Link to post
Share on other sites

error is this in bis_fnc_spawnVehicle

Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group)

do like this... though i encountered a issue with patch 1.60 and betas that didnt let bradleys or tusks run the BIS_fnc_taskPatrol correctly, maybe same for planes, i have a modified taskPatrol if needed that fixed it..

_airSpawn1 = [[(_pos) select 0, (_pos select 1)- 30, 200], 0, "Su25_TK_EP1", EAST] call BIS_fnc_spawnVehicle;
[[b](_airSpawn1 select 2)[/b], getPos _vehicleambush, 1000] call bis_fnc_taskPatrol;

edit, if issue still, try this modified bis_fnc_taskPatrol from my engageTowns.sqf

_BIS_fnc_taskPatrol_mod = {
// BIS_fnc_taskPatrol modified by Demonized to fix some vehicle bugs not moving when speed or beheaviour was not defined for each wp.
_grp = _this select 0;
_pos = _this select 1;
_maxDist = _this select 2;

for "_i" from 0 to (2 + (floor (random 3))) do {
	_newPos = [_pos, 50, _maxDist, 1, 0, 60 * (pi / 180), 0, []] call BIS_fnc_findSafePos;
	_wp = _grp addWaypoint [_newPos, 0];
	_wp setWaypointType "MOVE";
	_wp setWaypointSpeed "LIMITED";
	_wp setWaypointBehaviour "SAFE";
	_wp setWaypointFormation "STAG COLUMN";
	_wp setWaypointCompletionRadius 20;
};

_wp = _grp addWaypoint [_pos, 0];
_wp setWaypointType "CYCLE";
_wp setWaypointCompletionRadius 20;
true
};

and you run it same way:

_patrol = [_grp, (getMarkerPos _marker), 200] call _BIS_fnc_taskPatrol_mod;  // bug fix for some vehicles, using function at top of script.

Edited by Demonized

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
Sign in to follow this  

×