Jump to content

[Release] Andre Convoy Patrol


Donnovan

Recommended Posts

While your at it can you have the vehicle markers named something else besides 1-?. I would prefer to have a specific name and not to have their starting spawn marked on the map just their movements if your ok with that

Link to comment
Share on other sites

ZENITHOVMAN,

To solve the Bornholm problem, please add the code bellow before the line //Bot Weapons. This will make all the found waypoints visible on the map.

{
	_marker = createMarker ["donn_waypoints_car_" + (str _forEachIndex),_x];
	_marker setMarkerShape "Icon";
	_marker setMarkerType "mil_dot";
	_marker setMarkerColor "ColorRed";
} forEach donn_wps; 
Link to comment
Share on other sites

The point that must be near a main road is this point:

//A point on the map near a main road
_aPointNearRoad = [10648,15920,0];

The number of spawn points can be how many you want then to be. don't need to stuck in 3 spawns.

//Vehicle Spawns [[vehicle spawn position],[nothing],spawn angle,spawn radius][/color]
_spawns = [
	[[2000,10907,0.2],[],100,20],
	[[3786,6571,0.2],[],35,15],
        [[6000,16907,0.2],[],120,15],
        [[12786,4471,0.2],[],30,15],
	[[7195,9700,0.2],[],0,20]
];

This is just a example.

Link to comment
Share on other sites

@ richie

 

maybe this help:

_vCrew = [_vehicle, _grp] call BIS_fnc_spawnCrew;

_crew = crew _vehicle;

_driver = driver _vehicle;
_driver;

 

i use this in a heli, and the heligunner is there and shot at me :D  maybe it help :D

Link to comment
Share on other sites

Donovan have you changed the script lately ? It used to work but i just grabbed it from the original post and now i get :

 

13:28:24   Error Undefined variable in expression: _posnext
13:28:24 File mpmissions\__cur_mp.Chernarus\scripts\andre_convoy.sqf, line 473
13:28:24 Error in expression <tRandom;
_distToNext = _posNow distance _posNext;
_distToBefore = _posNext dista>
13:28:24   Error position: <_posNext;
_distToBefore = _posNext dista>

 

Anyone else seeing errors from line 473 ?

 

P.S - Any luck with armed vehicles yet ?

Link to comment
Share on other sites

Donovan have you changed the script lately ? It used to work but i just grabbed it from the original post and now i get :

 

13:28:24   Error Undefined variable in expression: _posnext
13:28:24 File mpmissions\__cur_mp.Chernarus\scripts\andre_convoy.sqf, line 473
13:28:24 Error in expression <tRandom;
_distToNext = _posNow distance _posNext;
_distToBefore = _posNext dista>
13:28:24   Error position: <_posNext;
_distToBefore = _posNext dista>
 

Anyone else seeing errors from line 473 ?

 

P.S - Any luck with armed vehicles yet ?

No errors with line 473, yet

Though I have errors with line 411 (or there about). Mission is running. No edits made yet.

 

File mpmissions\__cur_mp.Chernarus\scripts\andre_convoy.sqf, line 411
Error in expression <} forEach units _rosa_group;
if (_numbKA/_numbKA_total > 0.35) then {_KA_players>
  Error position: </_numbKA_total > 0.35) then {_KA_players>
  Error Zero divisor
Link to comment
Share on other sites

Richie,

 

Sounds your waypoint array donn_wps is empty.

 

Those are the reasons, i believe:

 

1 - You have not set a point near a main road (less than 200 meters) in _aPointNearRoad.

2 - You have set the point but it is not near a road.

Link to comment
Share on other sites

Floyd,
 
 This happens when you kill all convoy bots and they are still searching for you. Try to change this segment of code:
 
From:

if (!_targetOff) then {
	_followedsNew = [];
	{if (alive _x) then {_followedsNew = _followedsNew + [_x];};} forEach _followeds;
	_followeds = _followedsNew;
	if (count _followeds > 0) then {
		_numbKA = 0;
		_numbKA_total = (count units _rosa_group) * (count _followeds);
		{
			_unit = _x;
			{
				if (_unit knowsAbout _x > 3 && _unit distance _x < 300) then {_numbKA = _numbKA + 1;};
			} forEach _followeds;
		} forEach units _rosa_group;
		if (_numbKA/_numbKA_total > 0.35) then {_KA_players = true;};
	};
};

To:

if (!_targetOff) then {
	_followedsNew = [];
	_AiUnits = units _rosa_group;
	{if (alive _x) then {_followedsNew = _followedsNew + [_x];};} forEach _followeds;
	_followeds = _followedsNew;
	if (count _followeds > 0) then {
		_numbKA = 0;
		_numbKA_total = (count _AiUnits) * (count _followeds);
		{
			_unit = _x;
			{
				if (_unit knowsAbout _x > 3 && _unit distance _x < 300) then {_numbKA = _numbKA + 1;};
			} forEach _followeds;
		} forEach _AiUnits;
		if (_numbKA/_numbKA_total > 0.35) then {_KA_players = true;};
	};
};

Link to comment
Share on other sites

so anyone got this working on Bornholm? What ever I do I cant get the AI to spawn. I set my own points and it wont work. If I put the sqf in as it is on this page with the spawn points for altis, the ai will spawn but the points are in the ocean. Why is it that my spawn points wont work? Thanks

Link to comment
Share on other sites

Richie,

 

Sounds your waypoint array donn_wps is empty.

 

Those are the reasons, i believe:

 

1 - You have not set a point near a main road (less than 200 meters) in _aPointNearRoad.

2 - You have set the point but it is not near a road.

 

Thank you Donovan all sorted now :)

It was #1, I had 3 spawn points but 2 were miles away from _aPointNearRoad, I had hoped to have them spawning in different locations.

Link to comment
Share on other sites

Nice Richie!

 

The spawn can be in different locations, anywere you want. Also, there is no limitation in the distance between the spawn points and the road.

 

The point _aPointNearRoad is not a spawn point. This point is were the script will begin to map roads. This point need to be near a road.

Link to comment
Share on other sites

So I have triple checked that _aPointNearRoad is set on road and every point I set is legit but it still wont work on Bornholm. Is there certain type of road I have to have my _aPointNearRoad set by since Bornholm uses diff. roads? Im not sure what else would be causing this not to work?

Link to comment
Share on other sites

IMPORTANT

 

To make the vehicles run over player, change all setCombatMode "BLUE" to setCombatMode "RED".

 

The BLUE state was did to avoid AI from leaving the vehicle in inapropriate times, but its not necessary, and have the side effect to make the vehicle not run over players!

 

Thankyou RAZORMAN!

 

ON THE OTHER SIDE... we can make the vehicle run over player only if he had shot in the vehicle direction. What is better?

Link to comment
Share on other sites

IMPORTANT

 

To make the vehicles run over player, change all setCombatMode "BLUE" to setCombatMode "RED".

 

The BLUE state was did to avoid AI from leaving the vehicle in inapropriate times, but its not necessary, and have the side effect to make the vehicle not run over players!

 

Thankyou RAZORMAN!

 

ON THE OTHER SIDE... we can make the vehicle run over player only if he had shot in hte vehicle direction. What is better?

 

Squash everyone, they drive great, real lunatics :D stopping them is a challenge.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...