Jump to content

Recommended Posts

Guys I'm long gone from the game and the community. I'll probably not touch this script again but I just figured it would just be fair and try to help people one last time.

I've downloaded the latest version from either of the 3 available sources and I can't replicate any issues with downloading the files. After unpacking the archive files are just fine and I can load up the example missions in the editor. So I don't know why people seem to have issues with the downloads.

@brunohxcx:

1. Your mission already contains cfgFunctions. This can only be defined once. Try including this into your existing cfgFunctions definition:

class DMC {
 class ServerFunctions {
 file = "functions";
 class spawnAirPatrol {
 // 1 to call the function upon mission start, before objects are initialized.
 // Passed arguments are ["preInit"]
 preInit = 0;
 // 1 to call the function upon mission start, after objects are initialized.
 // Passed arguments are ["postInit"]
 postInit = 0;
 // 1 to recompile the function upon mission start
 // Mission functions are always compiled on init. No need to be redundant.
 recompile = 0;
 // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
 // Default is ".sqf".
 ext = ".sqf";
 };
};
};

2. As you can see the file locations in your mission are different than what's in my demo mission.

You will need to edit the all references of file locations in my scripts to reflect your mission specifics.

@JAndrews1:

The error basically says that "dmc_fnc_spawnairpatrol" is undefined. It's telling you that the variable that is used to reference the air patrol spawning function is empty. This can have any number of reasons. Just a wild guess ... did you create "mkrAirPatSta_01, ..." markers in your mission ? Because the script relies on those markers being present in the mission.sqm. Also verify that any references to file locations in your scripts as well as my scripts are correct.

Beyond that please understand that I won't be able to help further. If you can't get it working please ask an experienced scripter in the forums to maybe review your mission init files.

Good Luck

Share this post


Link to post
Share on other sites

Ok sry you left Demon. But thanks for the update. Perhaps you could release your script for anyone else to take if anyone wanted.

sry for the wall of code/text, but I wanted to give as much as possible so nobody would need to DL the demo to see.

So I will ask anyone else, I have this set up exactly like the demo version, however the only difference is the demo has the below listed separate in Des.ext,

#include "cfgFunctions.hpp"

but mine is

class CfgFunctions
{
   #include "EPD\EPDcfgFunctions.hpp"             // IEDs
   #include "scripts\VAS\cfgfunctions.hpp"             // VAS
   //#include "scripts\VVS\Functions.h"             // VVS
   #include "scripts\taw_vd\CfgFunctions.hpp"         // View distance
   #include "SRS\CfgFunctions.hpp"                // SRS Revive
   #include "JSHK_garrisonAll\cfgfunctions.hpp"            // JShock patrols
   #include "cfgFunctions.hpp"                        // DMC air patrols
};  

And to answer his question I have the markers listed init.server as

//DAC air patrol----------------------//
// Debug
DMC_DEBUG_MAPCENTER = FALSE;
DMC_DEBUG_NEARESTLOCATIONS = FALSE;
DMC_DEBUG_STARTINGPOSITIONS = FALSE;
DMC_DEBUG_PATROLWAYPOINTS = FALSE;
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_01",getMarkerPos "mkrAirPatSta_02",getMarkerPos "mkrAirPatSta_03",
getMarkerPos "mkrAirPatSta_04"],"O_Heli_Light_02_F",EAST,100,"YELLOW","SAFE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol;
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_04",getMarkerPos "mkrAirPatSta_05",getMarkerPos "mkrAirPatSta_06",
getMarkerPos "mkrAirPatSta_04"],"I_Heli_light_03_F",Resistance,100,"YELLOW","SAFE","NORMAL","SAD",0.80,1,30,TRUE] call DMC_fnc_spawnAirPatrol;

But continue to get this error;

19:18:37 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:18:37   Error position: <DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:18:37   Error Undefined variable in expression: dmc_fnc_spawnairpatrol
19:18:37 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 74  

But its also telling me the script "functions" is not found, its in the mission folder but the

#include "cfgFunctions.hpp"

is like this.

class DMC {
 class ServerFunctions {
 file = "functions";
 class spawnAirPatrol {
 // 1 to call the function upon mission start, before objects are initialized.
 // Passed arguments are ["preInit"]
 preInit = 0;
 // 1 to call the function upon mission start, after objects are initialized.
 // Passed arguments are ["postInit"]
 postInit = 0;
 // 1 to recompile the function upon mission start
 // Mission functions are always compiled on init. No need to be redundant.
 recompile = 0;
 // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
 // Default is ".sqf".
 ext = ".sqf";
 };
};
};

Lastly, sry for the wall of code/text, but I wanted to give as much as possible so nobody would need to DL the demo to see. I have also seen where "cfgFunctions.hpp" can get messed up if joined in group like mine.

Share this post


Link to post
Share on other sites

Do you have the cfgFunctions.hpp file in the main mission directory or in a subfolder within the main mission directory.

Share this post


Link to post
Share on other sites
Do you have the cfgFunctions.hpp file in the main mission directory or in a subfolder within the main mission directory.

yea. its all in same mission folder, no subfolder, although I tried that method too and no luck, I have to go back to the #include "cfgFunctions.hpp" and have to wonder if its something there getting messed up when its in a group of class CfgFunctions. I have seen it happen before. Just dont know how to fix.

---------- Post added at 03:04 ---------- Previous post was at 02:00 ----------

yea. its all in same mission folder, no subfolder, although I tried that method too and no luck, I have to go back to the #include "cfgFunctions.hpp" and have to wonder if its something there getting messed up when its in a group of class CfgFunctions. I have seen it happen before. Just dont know how to fix.

Ok, I changed "cfgFunctions.hpp" to this from another example I had (JShock), and its not giving me script not found anymore. But still getting error below. I will triple check markernames.

class DMC
{
 tag = "functions";
 class spawnAirPatrol
{
	file = "functions";
	// 1 to call the function upon mission start, before objects are initialized.
	// Passed arguments are ["preInit"]
	preInit = 0;
	// 1 to call the function upon mission start, after objects are initialized.
	// Passed arguments are ["postInit"]
	postInit = 0;
	// 1 to recompile the function upon mission start
	// Mission functions are always compiled on init. No need to be redundant.
	recompile = 0;
	// Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
	// Default is ".sqf".
	ext = ".sqf";
};
};

19:59:12 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:59:12   Error position: <DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:59:12   Error Undefined variable in expression: dmc_fnc_spawnairpatrol
19:59:12 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 72

Share this post


Link to post
Share on other sites

Ah, should have see it before, where you have "tag = "functions";" it should be:

tag = "DMC";

And the cfgFunctions.hpp should be in a folder named "functions" in the main mission directory. Along with the DMC .sqf files in that same folder.

Share this post


Link to post
Share on other sites
Ah, should have see it before, where you have "tag = "functions";" it should be:

tag = "DMC";

And the cfgFunctions.hpp should be in a folder named "functions" in the main mission directory. Along with the DMC .sqf files in that same folder.

ok, well that packs it up at least, still fixed the no script "functions" found error, but

20:36:59 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol;
private ["_air_p>
20:36:59   Error position: <DMC_fnc_spawnAirPatrol;
private ["_air_p>
20:36:59   Error Undefined variable in expression: dmc_fnc_spawnairpatrol
20:36:59 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 72

Share this post


Link to post
Share on other sites
Guys I'm long gone from the game and the community. I'll probably not touch this script again but I just figured it would just be fair and try to help people one last time.

I've downloaded the latest version from either of the 3 available sources and I can't replicate any issues with downloading the files. After unpacking the archive files are just fine and I can load up the example missions in the editor. So I don't know why people seem to have issues with the downloads.

@brunohxcx:

1. Your mission already contains cfgFunctions. This can only be defined once. Try including this into your existing cfgFunctions definition:

class DMC {
 class ServerFunctions {
 file = "functions";
 class spawnAirPatrol {
 // 1 to call the function upon mission start, before objects are initialized.
 // Passed arguments are ["preInit"]
 preInit = 0;
 // 1 to call the function upon mission start, after objects are initialized.
 // Passed arguments are ["postInit"]
 postInit = 0;
 // 1 to recompile the function upon mission start
 // Mission functions are always compiled on init. No need to be redundant.
 recompile = 0;
 // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
 // Default is ".sqf".
 ext = ".sqf";
 };
};
};

2. As you can see the file locations in your mission are different than what's in my demo mission.

You will need to edit the all references of file locations in my scripts to reflect your mission specifics.

thanks for the answer, I changed line 4 on cfgfunctions.hpp

file = "functions"; to file = "server\functions";

and on description.ext

#include "cfgFunctions.hpp" to #include "server\cfgFunctions.hpp"

but how can i change the map center? cause drimea doesn't seen to be the right map center for me...

Edited by brunohxcx

Share this post


Link to post
Share on other sites

Hey, not sure what you mean by drimea as center. I see this

// Find cities, villages and other locations within a specified radius
_locSSP = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");

Sry about this post size, I wanted put to DMC Air Patrol v1.3.sqf up so others can see and may be help with getting this to work.

/******************************************************************************/
/***                                                                        ***/
/*** DMC Air Patrol v1.3                                                    ***/
/*** by Demon Cleaner                                                       ***/
/***                                                                        ***/
/*** Changelog:   ((deleted for space))                                                          ***/
/***                                                                        ***/
//////////////////////////////

// Easy script identifier
scriptName "DMC_AIR_PATROL";

// Run on server only
if (!isServer) exitWith {};

private [
"_locSRD","_locPST","_patVHT","_patSID","_patALT","_patROE","_patBEH",
"_patSPE","_patWPT","_patSKL","_patNUM","_patMPT","_patRND","_locPST_keep",
"_locSSP","_nLocs","_posArr","_angArr","_a","_idx","_mpos","_angle",
"_radius","_fpos","_b","_spwArr","_spwVeh","_c","_nPat","_mkr"
];

// Fetch arguments - try to compensate for user input errors
_locSRD = [_this,0,5000,[0]] call BIS_fnc_param;
_locPST = [_this,1,[0,0],[0,[1,2]]] call BIS_fnc_param;
_patVHT = [_this,2,"O_Heli_Attack_02_F",[""]] call BIS_fnc_param;
_patSID = [_this,3,EAST] call BIS_fnc_param;
_patALT = [_this,4,100,[0]] call BIS_fnc_param;
_patROE = [_this,5,"YELLOW",["","BLUE","GREEN","WHITE","YELLOW","RED"]] call BIS_fnc_param;
_patBEH = [_this,6,"SAFE",["","SAFE","AWARE","COMBAT","STEALTH"]] call BIS_fnc_param;
_patSPE = [_this,7,"NORMAL",["","LIMITED","NORMAL","FULL"]] call BIS_fnc_param;
_patWPT = [_this,8,"MOVE",["",["MOVE","SAD","DESTROY"]]] call BIS_fnc_param;
_patSKL = [_this,9,0.95,[0,[0,1]]] call BIS_fnc_param;
_patNUM = [_this,10,1,[0,[1,((count _locPST) - 1)]]] call BIS_fnc_param;
_patMPT = [_this,11,300,[0]] call BIS_fnc_param;
_patRND = [_this,12,TRUE] call BIS_fnc_param;

// Safekeep initial spawn position(s)
_locPST_keep = _locPST;

// Find cities, villages and other locations within a specified radius
_locSSP = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");

// Debug map center position
if (DMC_DEBUG_MAPCENTER) then {
_mkr = createMarker [format ["Marker_%1",random 100],_locSSP];
_mkr setMarkerColor "colorWhite";
_mkr setMarkerType "mil_circle";
_mkr setMarkerText format [" Map Center Position: %1",str _locSSP];
};

_nLocs = nearestLocations [_locSSP,["NameCityCapital","NameCity","NameVillage"],_locSRD];

// Debug nearestLocations
if (DMC_DEBUG_NEARESTLOCATIONS) then {
{
	_mkr = createMarker [format ["Marker_%1",random 100],position _x];
	_mkr setMarkerColor "colorOrange";
	_mkr setMarkerType "mil_dot";
	_mkr setMarkerText format [" %1",str _x];
} forEach _nLocs;
};

// Select the air patrol spawn position(s) based on the results of the above query
_angArr = [];
_posArr = [];
for [{_a = 0},{_a < _patNUM},{_a = _a + 1}] do {
_idx = round (random ((count _locPST) - 1));
_mpos = _locPST select _idx;
_locPST = [_locPST,_idx] call BIS_fnc_removeIndex;
_angle = round (random 360 / pi);
_angArr set [_a,_angle];
_radius = 50 + (round (random 50));
_fpos = [(_mpos select 0)+(sin(_angle)*_radius),(_mpos select 1)+(cos(_angle)*_radius)];
_posArr set [_a,_fpos];

// Debug patrol starting positions
if (DMC_DEBUG_STARTINGPOSITIONS) then {
	_mkr = createMarker [format ["Marker_%1",random 100],_fPos];
	_mkr setMarkerColor "colorBlack";
	_mkr setMarkerType "mil_triangle";
	_mkr setMarkerText format [" Starting Position: %1",str _fPos];
};
};

// Spawn air patrol group(s)
_spwArr = [];
for [{_b = 0},{_b < _patNUM},{_b = _b + 1}] do {
_spwVeh = [(_posArr select _b),(_angArr select _b),_patVHT,_patSID] call BIS_fnc_spawnVehicle;
_spwArr set [_b,_spwVeh];
};

// Plot flight path(s) for air patrol
for [{_c = 0},{_c < _patNUM},{_c = _c + 1}] do {
_nPat = [
(_spwArr select _c),_nLocs,_patALT,_patROE,_patBEH,_patSPE,_patWPT,_patSKL,
_patMPT,_patRND,_locSRD,_locPST_keep,_patVHT,_patSID
] spawn {
	private [
	"_veh","_units","_grp","_locs","_nLocs","_nLoc","_wp","_eLoc","_alt","_roe",
	"_beh","_spe","_wpt","_mpt","_rnd","_srd","_pst","_vht","_sid","_skl","_am",
	"_d","_idx","_air_patrol","_mkr","_wayP","_mColor"
	];

	// Fetch arguments
	_veh = (_this select 0) select 0;		// Vehicle
	_units = (_this select 0) select 1; // Units
	_grp = (_this select 0) select 2;   // Group
	_locs = _this select 1;             // Patrol locations
	_alt = _this select 2;              // Flight altitude
	_roe = _this select 3;              // Rules of engagement
	_beh = _this select 4;              // Combat Behaviour
	_spe = _this select 5;              // Speed
	_wpt = _this select 6;              // Waypoints
	_skl = _this select 7;							// Unit skill
	_mpt = _this select 8;							// Min patrol time
	_rnd = _this select 9;              // Randomize waypoints
	_srd = _this select 10;							// Search distance
	_pst = _this select 11;							// Patrol starting positions
	_vht = _this select 12;							// Vehicle type
	_sid = _this select 13;							// Side

	// Patrol vehicle properties
	_veh = vehicle leader _veh;
	_veh setVehicleLock "LOCKED";
	_veh flyInHeight _alt;

	// Air patrol behaviour
	_grp setCombatMode _roe;
	_grp setBehaviour _beh;
	_grp setSpeedMode _spe;
	{_x setSkill _skl} forEach _units;

	// Plot flight path (randomized waypoints)
	if (_rnd) then {
		_locs = _locs call BIS_fnc_arrayShuffle;
		{
			_wp = _grp addWaypoint [position _x,250];
			_wp setWaypointType _wpt;
		} forEach _locs;
	// Plot flight path (fifo waypoints)
	} else {
		{
			_wp = _grp addWaypoint [position _x,250];
			_wp setWaypointType _wpt;
		} forEach _locs;
	};

	// Final waypoint set to cycle to keep the patrol moving
	_eLoc = _locs select 0;
	_wp = _grp addWaypoint [position _eLoc,500];
	_wp setWaypointType "CYCLE";

	// Debug patrol waypoints
	if (DMC_DEBUG_PATROLWAYPOINTS) then {
		_wayP = waypoints _grp;
		[_wayP] call BIS_fnc_arrayShift;
		{
			_mkr = createMarker [format ["Marker_%1",random 100],waypointPosition _x];
			_mColor = switch (str _grp) do {
				case "B Alpha 1-1": {"colorBlue"};
				case "B Alpha 1-2": {"colorRed"};
				case "B Alpha 1-3": {"colorGreen"};
				case "B Alpha 2-1": {"colorYellow"};
				default {"colorBlack"};
			};
			_mkr setMarkerColor _mColor;
			_mkr setMarkerType "mil_dot";
			_mkr setMarkerText format [" Waypoint: %1",str _x];
		} forEach _wayP;
	};

	// Wait for minimum patrol timer to run out
	sleep _mpt;

	// Wait for patrol to be destroyed or immobilized (eg: ran out of fuel, crash landed ...)
	waitUntil {((!(alive vehicle _veh)) || (!(canMove vehicle _veh)))};

	// Recursively call function to spawn a replacement patrol for the destroyed instance using user supplied parameters
	_air_patrol = [
		_srd,	// Search radius for patrol locations (Starting from map center position)
			_pst,	// Array of air patrol starting positions (Use whatever you like. Just make sure the result is a 2D position in format [x,y])
			_vht,	// Air patrol vehicle type (Anything that can fly and has a crew)
			_sid,	// Side of air patrol (West,East,Resistance,Civilian)
			_alt,	// Patrol altitude (Meters above ground)
			_roe,	// Patrol combat mode (Blue / Green / White / Yellow / Red)
			_beh,	// Patrol behaviour (Careless / Safe / Aware / Combat)
			_spe,	// Patrol speed (Limited / Normal / Full)
			_wpt,	// Waypoint type (Move / Sad / Destroy)
			_skl,	// Skill of the crew steering the patrol vehicle (0.0 - 1.0)
		1,		// Amount of air patrols to spawn (spawn positions will be randomized based on above defined marker locations)
			_mpt,	// Minimum patrol time (used as timer for alive / canMove check)
			_rnd	// Randomize waypoints (True / False)] call DMC_Air_Patrol;
	] call DMC_fnc_spawnAirPatrol;
};
};

// Return multidimensional array e.g: [[vehicle,[crew],group]]
_spwArr

Updated Init lines.

//DAC air patrol----------------------// 
// Debug 
DMC_DEBUG_MAPCENTER = FALSE; 
DMC_DEBUG_NEARESTLOCATIONS = FALSE; 
DMC_DEBUG_STARTINGPOSITIONS = FALSE; 
DMC_DEBUG_PATROLWAYPOINTS = FALSE; 
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_01",getMarkerPos "mkrAirPatSta_02",getMarkerPos "mkrAirPatSta_03"],"O_Heli_Light_02_F",EAST,100,"YELLOW","SAFE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol; 
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_04",getMarkerPos "mkrAirPatSta_05",getMarkerPos "mkrAirPatSta_06"],"I_Heli_light_03_F",Resistance,100,"YELLOW","SAFE","NORMAL","SAD",0.80,1,30,TRUE] call DMC_fnc_spawnAirPatrol;

Edited by JAndrews1

Share this post


Link to post
Share on other sites
Hey, not sure what you mean by drimea as center. I see this

try this and u ll see

DMC_DEBUG_MAPCENTER = true;

Share this post


Link to post
Share on other sites
try this and u ll see

DMC_DEBUG_MAPCENTER = true;

I wish I could, I cant get past this error.

20:36:59 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol; 
private ["_air_p> 
20:36:59   Error position: <DMC_fnc_spawnAirPatrol; 
private ["_air_p> 
20:36:59   Error Undefined variable in expression: dmc_fnc_spawnairpatrol 
20:36:59 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 72

Share this post


Link to post
Share on other sites

try this, i just add a space after each comma

// Debug
DMC_DEBUG_MAPCENTER = FALSE;
DMC_DEBUG_NEARESTLOCATIONS = FALSE;
DMC_DEBUG_STARTINGPOSITIONS = FALSE;
DMC_DEBUG_PATROLWAYPOINTS = FALSE;

private ["_air_patrol"]; 
_air_patrol = [5000, [getMarkerPos "mkrAirPatSta_01", getMarkerPos "mkrAirPatSta_02", getMarkerPos "mkrAirPatSta_03"], "B_Heli_Attack_01_F", EAST, 100, "YELLOW", "SAFE", "NORMAL", "SAD", 0.85, 1, 30, TRUE ] call DMC_fnc_spawnAirPatrol;

private ["_air_patrol"]; 
_air_patrol = [5000, [getMarkerPos "mkrAirPatSta_04", getMarkerPos "mkrAirPatSta_05", getMarkerPos "mkrAirPatSta_06"], "B_Heli_Attack_01_F", RESISTANCE, 100, "YELLOW", "SAFE", "NORMAL", "SAD", 0.85, 1, 30, TRUE ] call DMC_fnc_spawnAirPatrol;

Edited by brunohxcx

Share this post


Link to post
Share on other sites
try this, i just add a space after each comma

// Debug
DMC_DEBUG_MAPCENTER = FALSE;
DMC_DEBUG_NEARESTLOCATIONS = FALSE;
DMC_DEBUG_STARTINGPOSITIONS = FALSE;
DMC_DEBUG_PATROLWAYPOINTS = FALSE;

private ["_air_patrol"]; 
_air_patrol = [5000, [getMarkerPos "mkrAirPatSta_01", getMarkerPos "mkrAirPatSta_02", getMarkerPos "mkrAirPatSta_03"], "B_Heli_Attack_01_F", EAST, 100, "YELLOW", "SAFE", "NORMAL", "SAD", 0.85, 1, 30, TRUE ] call DMC_fnc_spawnAirPatrol;

private ["_air_patrol"]; 
_air_patrol = [5000, [getMarkerPos "mkrAirPatSta_04", getMarkerPos "mkrAirPatSta_05", getMarkerPos "mkrAirPatSta_06"], "B_Heli_Attack_01_F", RESISTANCE, 100, "YELLOW", "SAFE", "NORMAL", "SAD", 0.85, 1, 30, TRUE ] call DMC_fnc_spawnAirPatrol;

No such luck.

Share this post


Link to post
Share on other sites
No such luck.

strange... i tested here and it works, check the script instalation on your mission, and try to make any modification of the script on that demo mission before porting to your mission.

Share this post


Link to post
Share on other sites
strange... i tested here and it works, check the script instalation on your mission, and try to make any modification of the script on that demo mission before porting to your mission.

This is what I have, DMC folder with cfgFunctions.hpp and "functions" folder with fn_spawnAirPatrol.sqf inside, below is currently how its been modified;

cfgFunctions
class DMC
{
 tag = "DMC";
 class spawnAirPatrol
{
	file = "functions";
	// 1 to call the function upon mission start, before objects are initialized.
	// Passed arguments are ["preInit"]
	preInit = 0;
	// 1 to call the function upon mission start, after objects are initialized.
	// Passed arguments are ["postInit"]
	postInit = 0;
	// 1 to recompile the function upon mission start
	// Mission functions are always compiled on init. No need to be redundant.
	recompile = 0;
	// Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
	// Default is ".sqf".
	ext = ".sqf";
};
};

Description.ext

class CfgFunctions
{
#include "EPD\EPDcfgFunctions.hpp"				// IEDs
#include "scripts\VAS\cfgfunctions.hpp"			// VAS
//#include "scripts\VVS\Functions.h"				// VVS
#include "scripts\taw_vd\CfgFunctions.hpp"		// View distance
#include "SRS\CfgFunctions.hpp"					// SRS Revive
#include "JSHK_garrisonAll\cfgfunctions.hpp"	// JShock patrols
#include "DMC\cfgFunctions.hpp"					// DMC air patrols
};

Init.Server

//DAC air patrol----------------------//

//DAC air patrol----------------------// 
// Debug 
DMC_DEBUG_MAPCENTER = FALSE; 
DMC_DEBUG_NEARESTLOCATIONS = FALSE; 
DMC_DEBUG_STARTINGPOSITIONS = FALSE; 
DMC_DEBUG_PATROLWAYPOINTS = FALSE; 
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_01",getMarkerPos "mkrAirPatSta_02",getMarkerPos "mkrAirPatSta_03"],"O_Heli_Light_02_F",EAST,100,"YELLOW","SAFE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol; 
private ["_air_patrol"];_air_patrol = [5000,[getMarkerPos "mkrAirPatSta_04",getMarkerPos "mkrAirPatSta_05",getMarkerPos "mkrAirPatSta_06"],"I_Heli_light_03_F",Resistance,100,"YELLOW","SAFE","NORMAL","SAD",0.80,1,30,TRUE] call DMC_fnc_spawnAirPatrol;    

Error

19:43:03 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol; 
private ["_air_>
19:43:03   Error position: <DMC_fnc_spawnAirPatrol; 
private ["_air_>
19:43:03   Error Undefined variable in expression: dmc_fnc_spawnairpatrol
19:43:03 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 73

Me == :confused:

Share this post


Link to post
Share on other sites
This is what I have, DMC folder with cfgFunctions.hpp and "functions" folder with fn_spawnAirPatrol.sqf inside, below is currently how its been modified;

the script is inside a folder? mine is inside mymission\server\functions

so...

class cfgFunctions {
class DMC {
	class ServerFunctions {
		file = "server\functions";
		class spawnAirPatrol {
			// 1 to call the function upon mission start, before objects are initialized.
			// Passed arguments are ["preInit"]
			preInit = 0;
			// 1 to call the function upon mission start, after objects are initialized.
			// Passed arguments are ["postInit"]
			postInit = 0;
			// 1 to recompile the function upon mission start
			// Mission functions are always compiled on init. No need to be redundant.
			recompile = 0;
			// Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
			// Default is ".sqf".
			ext = ".sqf";
		};
	};
};
};

and on description.ext

#include "server\cfgFunctions.hpp"

Edited by brunohxcx

Share this post


Link to post
Share on other sites

yep, have main "DMC" folder in mission folder, (I changed to pack contents into 1 folder ((DMC))), <--- that folder has (cfgFunctions.hpp) AND ---> ("functions" folder) which holds (fn_spawnAirPatrol.sqf) **inside** just like the OP demo mission.

So your guess is good as mine...... and I am about out of guesses for this script.....

Share this post


Link to post
Share on other sites
This is what I have, DMC folder with cfgFunctions.hpp and "functions" folder with fn_spawnAirPatrol.sqf inside, below is currently how its been modified;

cfgFunctions
class DMC
{
 tag = "DMC";
 class spawnAirPatrol
{
	file = "functions";[/quote]

it shouldn't be?
[php]file = "dmc\functions";

Share this post


Link to post
Share on other sites

Ok, got this to work, wow about time. Basically removed the sqf from "functions" folder and burned that folder up, probably bugged for some reason and use this. Plus your advice to space out call lines in init.Server. WOW!!. I dont want to work this hard for free again!

class DMC {
 class ServerFunctions {
 file = "DMC";
 class spawnAirPatrol {
 // 1 to call the function upon mission start, before objects are initialized.
 // Passed arguments are ["preInit"]
 preInit = 0;
 // 1 to call the function upon mission start, after objects are initialized.
 // Passed arguments are ["postInit"]
 postInit = 0;
 // 1 to recompile the function upon mission start
 // Mission functions are always compiled on init. No need to be redundant.
 recompile = 0;
 // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM).
 // Default is ".sqf".
 ext = ".sqf";
 };
};
};

Share this post


Link to post
Share on other sites

I've updated this script ... it's been a while. Mirrors updated in first post.

 

v1.4

- Fixed an error in waypoint generation
- Added code to remove Air Patrol specific markers when not in debug
- Refined waypoint generation and added debug markers
- Added OPFOR air vehicle class names
- Removed functions folder for simplicity
- Fixed cfgFunctions.hpp

 

Someone remind me again how to get stuff onto Armaholic. I guess I'm old and keep forgetting things. :wacko:

 

BTW: I guess I'm back ;)

Share this post


Link to post
Share on other sites

Yeah Yeah Yeah Yeah

 

I've got the demons in me

I've got to brush them all away
I feel the demons rage
I must clean them all away

 

 

 

Welcome back!

Share this post


Link to post
Share on other sites

Yeah Yeah Yeah Yeah

 

 

 

Welcome back!

 

haha ... someone is getting it right. Keep on listening to the good stuff :)

 

Actually I've released v1.41 as v1.4 contains a rather serious bug :blink:

Download links updated in first post

Share this post


Link to post
Share on other sites

How does this script do in performance ?  Those patrolling crafts do they take away a lot of cpu power ?  I'm just curious cause it sounds awesome and something I like to use in some dynamic missions I'm working on.  Personally I like to define a patrol area instead of an entire map though, but I haven't read all the features yet on this script:)  maybe it's in there

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

×