Jump to content

Recommended Posts

Any suggestions?

 

Brilliant!  The only suggestion I'd make is for the case when you have multiple selections.  Rather than outputting an array with each unit's class and faction, I'm going to go out on a limb and say the unit class names aren't as important, so don't even worry about logging those.  I'd simply loop over every unit in the selection, grab its faction config value, and then use pushBackUnique to build your array.  This way, rather than having the two-dimensional array you posted above:

[["B_support_AMG_F","B_APC_Tracked_01_AA_F","B_G_Mortar_01_F","B_Boat_Transport_01_F","O_Soldier_A_F","I_Soldier_AAR_F","C_man_polo_3_F","SignAd_Sponsor_ARMEX_F"],
["BLU_F","BLU_F","BLU_G_F","BLU_F","OPF_F","IND_F","CIV_F","Default"]]

you'd just have this instead:

["BLU_F","BLU_G_F","OPF_F","IND_F","CIV_F","Default"]

Share this post


Link to post
Share on other sites

I think that for a single unit the faction class name should just be copied to the clipboard without any fuss, so you can paste it without editing into ALiVE modules and such.

Share this post


Link to post
Share on other sites

Here's a little preview of an upcoming attribte. Hope you like it. If you have feedback, now is the right time. (It's still heavily WIP)

 

Attribute:

http://i.imgur.com/QvMOsJA.jpg

 

Combo Box contains all available (and not available) markers

http://imgur.com/0B95ZOS

 

Combo Box with all colours, same as with standard marker placing

http://imgur.com/tLQAMv7

 

Unit will be tracked and markers updated with given interval

http://imgur.com/jNpvMJh

 

Once a unit dies, its marker changes to KIA

http://i.imgur.com/iWcSChn.jpg

  • Like 1

Share this post


Link to post
Share on other sites

I don't think the issue is  the number of attributes, but rather some coding issue on my end, except you got some reliable background info about that.

Good evening R3vo,

I made the mission corax is refering to.

I made a quick test with a new mission:

http://images.akamai.steamusercontent.com/ugc/492395204697441224/B6599A7BFFCCAE82627214C3ED115CCD676DB23B/

File name: Eden_enhanced_test.Stratis

This is the result in the mission list:

http://images.akamai.steamusercontent.com/ugc/492395204697441544/C02F907E39FCA2A835FF1ADAF78997B1E0D8E0B8/

 

Mission .sqm in the spoiler

version=52;
class EditorData
{
	moveGridStep=1;
	angleGridStep=0.2617994;
	scaleGridStep=1;
	autoGroupingDist=10;
	toggles=1;
	class ItemIDProvider
	{
		nextID=2;
	};
	class Camera
	{
		pos[]={1842.1769,7.2694263,5688.8335};
		dir[]={0.005728852,-0.13348228,-0.99104899};
		up[]={0.00077160425,0.99105084,-0.13349};
		aside[]={-0.99999726,1.3753674e-007,-0.0057806941};
	};
};
binarizationWanted=0;
addons[]=
{
	"A3_Data_F_Curator_Characters",
	"a3_characters_f"
};
randomSeed=6254657;
class ScenarioData
{
	author="Znoop";
};
class CustomAttributes
{
	class Category0
	{
		name="Scenario";
		class Attribute0
		{
			property="Enh_randomMusic";
			expression="				if (!is3DEN && !(_value isEqualTo [])) then				{					(selectRandom _value) remoteExec ['playMusic',0];				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"ARRAY"
						};
					};
				};
			};
		};
		class Attribute1
		{
			property="EnableDebugConsole";
			expression="true";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=0;
				};
			};
		};
		class Attribute2
		{
			property="'Enh_line2'";
			expression="missionNamespace setVariable ['Enh_introLine2',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"STRING"
						};
					};
					value="by Znoop";
				};
			};
		};
		class Attribute3
		{
			property="Enh_centerPosition";
			expression="missionNamespace setVariable ['Enh_centerPosition',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"ARRAY"
						};
					};
					class value
					{
						items=3;
						class Item0
						{
							class data
							{
								class type
								{
									type[]=
									{
										"SCALAR"
									};
								};
								value=0;
							};
						};
						class Item1
						{
							class data
							{
								class type
								{
									type[]=
									{
										"SCALAR"
									};
								};
								value=0;
							};
						};
						class Item2
						{
							class data
							{
								class type
								{
									type[]=
									{
										"SCALAR"
									};
								};
								value=0;
							};
						};
					};
				};
			};
		};
		class Attribute4
		{
			property="Enh_directionCamera";
			expression="missionNamespace setVariable ['Enh_directionCamera',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=0;
				};
			};
		};
		class Attribute5
		{
			property="Enh_establisingShot_activate";
			expression="				if (!is3DEN && _value) then				{					[] spawn					{						waitUntil {time > 0.005};						[							missionNamespace getVariable 'Enh_centerPosition',							missionNamespace getVariable 'Enh_displayText',							missionNamespace getVariable 'Enh_altitude',							missionNamespace getVariable 'Enh_radius',							missionNamespace getVariable 'Enh_viewingAngle',							missionNamespace getVariable 'Enh_directionCamera'						]						remoteExec ['BIS_fnc_establishingShot',0,true];					}				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"BOOL"
						};
					};
					value=0;
				};
			};
		};
		class Attribute6
		{
			property="Enh_soundVolume";
			expression="				if (!is3DEN) then				{					[0,_value] remoteExec ['fadeSound',0,true];				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=1;
				};
			};
		};
		class Attribute7
		{
			property="Enh_introActivate";
			expression="				if (_value && !is3DEN) then				{					[] spawn					{						waitUntil {time > 0.5};						waitUntil {time > ((missionNamespace getVariable ['Enh_introDelay',5]) - 0.5)};						[							parseText format							[								""<t align='right' size='1.6'><t font='PuristaBold' size='1.8'>%1<br/></t>%2<br/>%3</t>"",								(missionNamespace getVariable 'Enh_introLine1'),								(missionNamespace getVariable 'Enh_introLine2'),								(missionNamespace getVariable 'Enh_introLine3')							],							true						] remoteExec ['BIS_fnc_textTiles',0,true];					}				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"BOOL"
						};
					};
					value=0;
				};
			};
		};
		class Attribute8
		{
			property="Enh_introDelay";
			expression="missionNamespace setVariable ['Enh_introDelay',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=5;
				};
			};
		};
		class Attribute9
		{
			property="Enh_displayText";
			expression="missionNamespace setVariable ['Enh_displayText',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"STRING"
						};
					};
					value="Stratis";
				};
			};
		};
		class Attribute10
		{
			property="'Enh_line3'";
			expression="missionNamespace setVariable ['Enh_introLine3',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"STRING"
						};
					};
					value="12:00:01";
				};
			};
		};
		class Attribute11
		{
			property="Enh_musicVolume";
			expression="				if (!is3DEN) then				{					[0,_value] remoteExec ['fadeMusic',0,true];				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=1;
				};
			};
		};
		class Attribute12
		{
			property="Enh_radius";
			expression="missionNamespace setVariable ['Enh_radius',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=100;
				};
			};
		};
		class Attribute13
		{
			property="Enh_firstLine";
			expression="missionNamespace setVariable ['Enh_introLine1',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"STRING"
						};
					};
					value="";
				};
			};
		};
		class Attribute14
		{
			property="Enh_radioVolume";
			expression="				if (!is3DEN) then				{					[0,_value] remoteExec ['fadeRadio',0,true];				};			";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=1;
				};
			};
		};
		class Attribute15
		{
			property="'Enh_altitude'";
			expression="missionNamespace setVariable ['Enh_altitude',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=300;
				};
			};
		};
		class Attribute16
		{
			property="Enh_viewingAngle";
			expression="missionNamespace setVariable ['Enh_viewingAngle',_value]";
			class Value
			{
				class data
				{
					class type
					{
						type[]=
						{
							"SCALAR"
						};
					};
					value=45;
				};
			};
		};
		nAttributes=17;
	};
};
class Mission
{
	class Intel
	{
		briefingName="EDEN ENHANCED TEST";
		timeOfChanges=1800.0002;
		startWeather=0.30000001;
		startWind=0.1;
		startWaves=0.1;
		forecastWeather=0.30000001;
		forecastWind=0.1;
		forecastWaves=0.1;
		forecastLightnings=0.1;
		year=2035;
		month=7;
		day=6;
		hour=12;
		minute=0;
		startFogDecay=0.013;
		forecastFogDecay=0.013;
	};
	class Entities
	{
		items=1;
		class Item0
		{
			dataType="Group";
			side="West";
			class Entities
			{
				items=1;
				class Item0
				{
					dataType="Object";
					class PositionInfo
					{
						position[]={1842.2494,5.5014515,5686.3584};
					};
					side="West";
					flags=7;
					class Attributes
					{
						isPlayer=1;
					};
					id=1;
					type="b_soldier_unarmed_f";
					atlOffset=1.2397766e-005;
				};
			};
			class Attributes
			{
			};
			id=0;
			atlOffset=1.2397766e-005;
		};
	};
};
 

After I removed the Class customAttributes the mission name is displayed as defined in the Eden Editor.

Edited .sqm for reference:

 

 

version=52;
class EditorData
{
	moveGridStep=1;
	angleGridStep=0.2617994;
	scaleGridStep=1;
	autoGroupingDist=10;
	toggles=1;
	class ItemIDProvider
	{
		nextID=2;
	};
	class Camera
	{
		pos[]={1842.1769,7.2694263,5688.8335};
		dir[]={0.005728852,-0.13348228,-0.99104899};
		up[]={0.00077160425,0.99105084,-0.13349};
		aside[]={-0.99999726,1.3753674e-007,-0.0057806941};
	};
};
binarizationWanted=0;
addons[]=
{
	"A3_Data_F_Curator_Characters",
	"a3_characters_f"
};
randomSeed=6254657;
class ScenarioData
{
	author="Znoop";
};

class Mission
{
	class Intel
	{
		briefingName="EDEN ENHANCED TEST";
		timeOfChanges=1800.0002;
		startWeather=0.30000001;
		startWind=0.1;
		startWaves=0.1;
		forecastWeather=0.30000001;
		forecastWind=0.1;
		forecastWaves=0.1;
		forecastLightnings=0.1;
		year=2035;
		month=7;
		day=6;
		hour=12;
		minute=0;
		startFogDecay=0.013;
		forecastFogDecay=0.013;
	};
	class Entities
	{
		items=1;
		class Item0
		{
			dataType="Group";
			side="West";
			class Entities
			{
				items=1;
				class Item0
				{
					dataType="Object";
					class PositionInfo
					{
						position[]={1842.2494,5.5014515,5686.3584};
					};
					side="West";
					flags=7;
					class Attributes
					{
						isPlayer=1;
					};
					id=1;
					type="b_soldier_unarmed_f";
					atlOffset=1.2397766e-005;
				};
			};
			class Attributes
			{
			};
			id=0;
			atlOffset=1.2397766e-005;
		};
	};
};
 

And a screenshot of the mission list:

http://images.akamai.steamusercontent.com/ugc/492395204697463573/161183F41E16613DB8EE8261009B765D25AF6FA5/

 

Edit: unfortunately I'm not into coding so I don't know what's causing this issue.

Share this post


Link to post
Share on other sites

Thanks for that detailed feedback.

 

 

Edit: unfortunately I'm not into coding so I don't know what's causing this issue.

 

 

I have no clue myself :icon_wink:

Share this post


Link to post
Share on other sites

Another thing from the UO forums:

http://forums.unitedoperations.net/index.php/topic/26663-psa-arma-bug-with-custom-attributes/

 

Arma has a limit of the amount of custom attributes, that number being 7. The result is the file name being displayed on the mission screen and other functions that may be be present.

 
This is a problem for mods like eden enhanced, where there are 16 attributes.
 
This issue can be resolved with going into your mission.sqm, and delete attributes 7+, and change the nAttributes  value to 7 (or else it crashes the game).
 
I am working on a more permanent solution, maybe one with less gimmicks...

Share this post


Link to post
Share on other sites

Hi R3vo

 

First off, amazing work! 

 

Was wondering if you have plans of adding a quick and easy way of adding mission briefings and Tasks to this?

It always such a huge mission to add briefings and Tasks, especially when it comes to MP missions.

 

Cheers 

Twak

  • Like 1

Share this post


Link to post
Share on other sites

Hi R3vo

 

First off, amazing work! 

 

Was wondering if you have plans of adding a quick and easy way of adding mission briefings and Tasks to this?

It always such a huge mission to add briefings and Tasks, especially when it comes to MP missions.

 

Cheers 

Twak

 

There are no plans right now, however, I can recommend FHQ Task Tracker 3den Plugin. Works splendidly.

Share this post


Link to post
Share on other sites

LOL, why doesn't BI get their shit together and make this mod official xD BTW, is there a way to set aircraft to "Flying" that I'm missing? If not, I'd love to see it!

Share this post


Link to post
Share on other sites

s there a way to set aircraft to "Flying" that I'm missing? If not, I'd love to see it!

 

If you place them 20m above ground they will fly automatically.

Share this post


Link to post
Share on other sites

Hi R3vo, thanks for your mod I use every time. Perhaps, you could help with this problem.

 

I added Massi's WW2 units mod and Unsung alfa ones. Unsung comes with plenty of insignia.

Recently, i removed Unsung, then starting preview, I got some error messages for missing insigna (bis_fnc_insignia doesn't find UNS_blabla...)

Browsing the mission.sqm, i found that (Unsung) insignia attributes are still present even if I never specified an insignia for the units.

The missing insignia seems to be the first one (by default?) of the insignia list in your mod.

 

Thanks

Pierre

Share this post


Link to post
Share on other sites

Hi R3vo, thanks for your mod I use every time. Perhaps, you could help with this problem.

 

I added Massi's WW2 units mod and Unsung alfa ones. Unsung comes with plenty of insignia.

Recently, i removed Unsung, then starting preview, I got some error messages for missing insigna (bis_fnc_insignia doesn't find UNS_blabla...)

Browsing the mission.sqm, i found that (Unsung) insignia attributes are still present even if I never specified an insignia for the units.

The missing insignia seems to be the first one (by default?) of the insignia list in your mod.

 

Thanks

Pierre

 

Thanks for your feedback. This issue will be fixed with an upcoming update.

  • Like 1

Share this post


Link to post
Share on other sites

If you place them 20m above ground they will fly automatically.

Ah okay, so still the default Eden 20 m start-up height :( I don't know how difficult it is but a flying or no flying ckeckbox option, like in the 2D editor, would be great.

Share this post


Link to post
Share on other sites

One thing I really would like to see, is a function that allows me to hide factions that I do not want to use when making a mission, for example hiding the vanilla factions when playing stuff like Unsung Vietnam, Optre. or WW II mods. Such a function would also be nice when using different faction packs.

 

Just an idea  :) thx for your work

Share this post


Link to post
Share on other sites

R3vo, whats the name of the Camouflage Coefficient that gets changed? I want to call it via script in order to see if its possible to change it during a mission. If it could be changed and the change would take an effect, then it would be possible to have an advanced stealth mod if you are laying prone your stealth goes up and enemies will have much harder time spotting you and so on.

  • Like 1

Share this post


Link to post
Share on other sites

R3vo, whats the name of the Camouflage Coefficient that gets changed? I want to call it via script in order to see if its possible to change it during a mission. If it could be changed and the change would take an effect, then it would be possible to have an advanced stealth mod if you are laying prone your stealth goes up and enemies will have much harder time spotting you and so on.

 

Good idea. https://community.bistudio.com/wiki/setUnitTrait

Share this post


Link to post
Share on other sites

Why can't you move characters with the attribute of a animation?

Share this post


Link to post
Share on other sites

Anyway to add the ambientFlyBy, ambientHelicopters and ambientPlanes in the functions in arma 3 function viewer. I found these while looking for some functions in function viewer.

 

BIS_fnc_ambientFlyby

/*
	Author: Nelson Duarte

	Description:
	Spawns an ambient air unit, makes it move and deletes it when it reaches destination
	Vehicle will never engage and will be flagged as captive
	Good for simple creation of ambient fly by's

	Parameter(s):
	_this select 0:	ARRAY - The position where vehicle will spawn
	_this select 1:	ARRAY - The end position of the vehicle, it will be deleted here
	_this select 2:	NUMBER - The spawn and flight height of the vehicle
	_this select 3:	STRING - The speed the vehicle will move ("LIMITED", "NORMAL", "FULL")
	_this select 4:	STRING - The classname of the vehicle to spawn
	_this select 5:	SIDE - The side the vehicle belongs
	
	Returns:
	BOOL - true on success
*/

//Params
private ["_start", "_end", "_height", "_speed", "_class", "_side"];
_start 		= _this param [0, [0,0,0], [[]]];
_end 		= _this param [1, [100,100,100], [[]]];
_height 	= _this param [2, 100, [0]];
_speed		= _this param [3, "NORMAL", [""]];
_class 		= _this param [4, "B_Heli_Light_01_F", [""]];
_side		= _this param [5, WEST, [WEST]];

//Set spawn height
_start set [2, _height];

//The starting direction of the vehicle
private "_direction";
_direction = [_start, _end] call BIS_fnc_dirTo;

//Spawn the vehicle
private ["_vehicleContainer", "_vehicle", "_vehicleCrew", "_vehicleGroup"];
_vehicleContainer	= [_start, _direction, _class, _side] call BIS_fnc_spawnVehicle;
_vehicle 		= _vehicleContainer select 0;
_vehicleCrew		= _vehicleContainer select 1;
_vehicleGroup		= _vehicleContainer select 2;

//The vehicle/group should ignore it's surroundings
_vehicle disableAi "TARGET";
_vehicle disableAi "AUTOTARGET";
_vehicle setCaptive true;
_vehicleGroup allowFleeing 0;

//Fly height
_vehicle flyInHeight _height;

//Add waypoint
private "_waypoint";
_waypoint = _vehicleGroup addWaypoint [_end, 0];

//Set waypoint properties
_waypoint setWaypointType "MOVE";
_waypoint setWaypointBehaviour "CARELESS";
_waypoint setWaypointCombatMode "BLUE";
_waypoint setWaypointSpeed _speed;

//The waypoint statements
//Once unit completes waypoint we clean up crew/vehicle/group
_waypoint setWaypointStatements [
	"true",
	"private ['_group', '_vehicle']; _group = group this; _vehicle = vehicle this; { deleteVehicle _x } forEach units _group; deleteVehicle _vehicle; deleteGroup _group;"
];

//Valid
if (!isNull _vehicle) then {
	//Log
	["Ambient flyby %1 (%2) spawned at %3 and will move to %4 with a height of %5 and with %6 speed, of %7 side", _class, _vehicle, _start, _end, _height, _speed, _side] call BIS_fnc_logFormat;
	
	//Return value
	true;
} else {
	//Log
	"Ambient flyby failed to create vehicle, consider making sure the wanted side center exists" call BIS_fnc_error;
	
	//Return value
	false;
};

BIS_fnc_ambientHelicopters

/*%FSM<COMPILE "C:\BIS\fsmeditor\scriptedFSM.cfg, ambientHelicopters">*/
/*%FSM<HEAD>*/
/*
item0[] = {"ambient_Helicopt",0,4346,-125.000000,-250.000000,-25.000000,-200.000000,0.000000,"ambient" \n "Helicopters"};
item1[] = {"Return",8,218,-125.000000,-175.000000,-25.000000,-125.000000,0.000000,"Return"};
item2[] = {"Loop_Reset",2,250,-275.000000,50.000000,-175.000000,100.000000,0.000000,"Loop Reset"};
item3[] = {"Wait",4,218,-125.000000,50.000000,-25.000000,100.000000,0.000000,"Wait"};
item4[] = {"Vehicle_Settings",2,250,25.000000,50.000000,125.000000,100.000000,0.000000,"Vehicle" \n "Settings"};
item5[] = {"Loop",4,218,25.000000,-25.000000,125.000000,25.000000,1.000000,"Loop"};
item6[] = {"Wait",2,250,-125.000000,-25.000000,-25.000000,25.000000,0.000000,"Wait"};
item7[] = {"",7,210,71.000000,-154.000000,79.000000,-146.000000,0.000000,""};
item8[] = {"",7,210,196.000000,71.000000,204.000000,79.000000,0.000000,""};
item9[] = {"Delete",4,218,275.000000,-25.000000,375.000000,25.000000,2.000000,"Delete"};
item10[] = {"",7,210,196.000000,-154.000031,204.000000,-145.999969,0.000000,""};
item11[] = {"Delete",2,250,275.000000,-100.000000,375.000000,-50.000000,0.000000,"Delete"};
item12[] = {"Create",4,218,150.000000,-25.000000,250.000000,25.000000,2.000000,"Create"};
item13[] = {"Create",2,250,150.000000,-100.000000,250.000000,-50.000000,0.000000,"Create"};
item14[] = {"No_vehicles",4,218,-125.000000,-325.000000,-25.000000,-275.000000,1.000000,"No vehicles"};
item15[] = {"Exit",1,250,-125.000000,-400.000000,-25.000000,-350.000000,0.000000,"Exit"};
item16[] = {"",7,210,321.000000,71.000000,329.000000,79.000000,0.000000,""};
item17[] = {"",7,210,321.000000,-154.000000,329.000000,-146.000015,0.000000,""};
link0[] = {0,1};
link1[] = {0,14};
link2[] = {1,2};
link3[] = {2,3};
link4[] = {3,4};
link5[] = {4,1};
link6[] = {4,5};
link7[] = {4,8};
link8[] = {4,16};
link9[] = {5,6};
link10[] = {6,3};
link11[] = {7,1};
link12[] = {7,5};
link13[] = {8,12};
link14[] = {9,11};
link15[] = {10,7};
link16[] = {11,17};
link17[] = {12,13};
link18[] = {13,10};
link19[] = {14,15};
link20[] = {16,9};
link21[] = {17,7};
globals[] = {25.000000,1,0,0,16777215,640,480,1,22,6316128,1,-337.214844,510.738586,397.369324,-801.231323,636,899,1};
window[] = {2,-1,-1,-1,-1,965,-1064,-104,216,3,653};
*//*%FSM</HEAD>*/
class FSM
{
  fsmName = "ambientHelicopters";
  class States
  {
    /*%FSM<STATE "ambient_Helicopt">*/
    class ambient_Helicopt
    {
      name = "ambient_Helicopt";
      itemno = 0;
      init = /*%FSM<STATEINIT""">*/"_vehCountMax =	[_this,0,3,[0]] call bis_fnc_param;" \n
       "_schnobble =	[_this,1,3000,[0]] call bis_fnc_param;" \n
       "_schnobbleMax = _schnobble * 2;" \n
       "_schnobbleMin = _schnobble / 2;" \n
       "" \n
       "//--- Detect all heliports" \n
       "_locationTypes = [""Heliport"",""HeliportHospital"",""HeliportTrauma""];" \n
       "_areaPos = position ([] call BIS_fnc_worldArea);" \n
       "_areaSize = (triggerarea ([] call BIS_fnc_worldArea)) select 0;" \n
       "_areaSize = [_areaSize,_areaSize] distance [0,0];" \n
       "" \n
       "_heliportsAll = nearestlocations [" \n
       "	_areaPos," \n
       "	_locationTypes," \n
       "	_areaSize" \n
       "];" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "//--- Get helicopter classes" \n
       "_listClasses = [];" \n
       "_cfgVehicles = configfile >> ""cfgvehicles"";" \n
       "for ""_c"" from 0 to (count _cfgVehicles - 1) do {" \n
       "	_current = _cfgVehicles select _c;" \n
       "	if (isclass _current) then {" \n
       "		_currentClass = configname _current;" \n
       "		if (_currentClass iskindof ""helicopter"") then {" \n
       "			_scope = getnumber (_current >> ""scope"");" \n
       "			_ambientType = getnumber (_current >> ""ambientType"");" \n
       "			if (_scope > 1 && _ambientType > 0) then {" \n
       "				_listClasses set [count _listClasses,_currentClass];" \n
       "			};" \n
       "		};" \n
       "	};" \n
       "};" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "//--- Create vehicles" \n
       "_listVehs = [];" \n
       "_listClassesTemp = [];" \n
       "for ""_i"" from 0 to (_vehCountMax - 1) do {" \n
       "" \n
       "	//--- Classes exceeded; reset" \n
       "	if (count _listClassesTemp < 1) then {_listClassesTemp = _listClasses};" \n
       "	_class = _listClassesTemp call bis_fnc_selectrandom;" \n
       "	_listClassesTemp = _listClassesTemp - [_class];" \n
       "" \n
       "	_vehArray = [" \n
       "		[99,99,99 * _i]," \n
       "		0," \n
       "		_class," \n
       "		side player" \n
       "	] call bis_fnc_spawnVehicle;" \n
       "" \n
       "	_veh = _vehArray select 0;" \n
       "	_vehGrp = _vehArray select 1;" \n
       "	_listVehs set [count _listVehs,_veh];" \n
       "	_veh enablesimulation false;" \n
       "	_veh hideobject true;" \n
       "	_veh flyinheight (200 + 20 * _i)" \n
       "};" \n
       "_listVehsCount = count _listVehs - 1;" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "" \n
       "//--- Blacklist init" \n
       "0 call bis_fnc_ambientBlacklist;" \n
       "" \n
       "_vSpawned = 0;" \n
       "_time = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "No_vehicles">*/
        class No_vehicles
        {
          itemno = 14;
          priority = 1.000000;
          to="Exit";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"count _listVehs < 1"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Return">*/
        class Return
        {
          itemno = 1;
          priority = 0.000000;
          to="Loop_Reset";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Loop_Reset">*/
    class Loop_Reset
    {
      name = "Loop_Reset";
      itemno = 2;
      init = /*%FSM<STATEINIT""">*/"_player = vehicle cameraon;" \n
       "" \n
       "//--- Loop vars" \n
       "_v = 0;" \n
       "_time = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Wait">*/
        class Wait
        {
          itemno = 3;
          priority = 0.000000;
          to="Vehicle_Settings";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(time - _time) > 1"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Vehicle_Settings">*/
    class Vehicle_Settings
    {
      name = "Vehicle_Settings";
      itemno = 4;
      init = /*%FSM<STATEINIT""">*/"_veh = _listVehs select _v;" \n
       "_pos = position _player;" \n
       "" \n
       "//--- Get nearby heliports" \n
       "_heliportsCount = count nearestlocations [" \n
       "	position _player," \n
       "	_locationTypes," \n
       "	_schnobbleMax" \n
       "];" \n
       ""/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Create">*/
        class Create
        {
          itemno = 12;
          priority = 2.000000;
          to="Create";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(_pos distance _veh > _schnobble)" \n
           "&&" \n
           "_vSpawned < _heliportsCount" \n
           "&&" \n
           "!(_pos call bis_fnc_ambientBlacklist)"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Delete">*/
        class Delete
        {
          itemno = 9;
          priority = 2.000000;
          to="Delete";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(" \n
           "	(_pos distance _veh > _schnobble)" \n
           "	&&" \n
           "	_vSpawned >= _heliportsCount" \n
           "	&&" \n
           "	simulationenabled _veh" \n
           ")" \n
           "||" \n
           "!alive _veh"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Loop">*/
        class Loop
        {
          itemno = 5;
          priority = 1.000000;
          to="Wait";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"_v = _v + 1;" \n
           "_v < _listVehsCount"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Return">*/
        class Return
        {
          itemno = 1;
          priority = 0.000000;
          to="Loop_Reset";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Wait">*/
    class Wait
    {
      name = "Wait";
      itemno = 6;
      init = /*%FSM<STATEINIT""">*/"_time = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Wait">*/
        class Wait
        {
          itemno = 3;
          priority = 0.000000;
          to="Vehicle_Settings";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(time - _time) > 1"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Delete">*/
    class Delete
    {
      name = "Delete";
      itemno = 11;
      init = /*%FSM<STATEINIT""">*/"_vSpawned = _vSpawned - 1;" \n
       "" \n
       "_veh setpos [99,99,99];" \n
       "_veh enablesimulation false;" \n
       "_veh hideobject true;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Loop">*/
        class Loop
        {
          itemno = 5;
          priority = 1.000000;
          to="Wait";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"_v = _v + 1;" \n
           "_v < _listVehsCount"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Return">*/
        class Return
        {
          itemno = 1;
          priority = 0.000000;
          to="Loop_Reset";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Create">*/
    class Create
    {
      name = "Create";
      itemno = 13;
      init = /*%FSM<STATEINIT""">*/"_pos = [" \n
       "	_pos," \n
       "	_schnobbleMin + random _schnobbleMin," \n
       "	direction _player - 30 + random 60" \n
       "] call bis_fnc_relpos;" \n
       "_posZ = 200 + 20 * _v;" \n
       "_pos set [2,_posZ];" \n
       "_dirTo = random 360;" \n
       "" \n
       "_veh setpos _pos;" \n
       "_veh setdir _dirto;" \n
       "_veh setvelocity [0,0,0];" \n
       "" \n
       "_pos = [" \n
       "	position _veh," \n
       "	10000," \n
       "	_dirTo" \n
       "] call bis_fnc_relpos;" \n
       "if !(_pos call bis_fnc_ambientBlacklist) then {" \n
       "	_pos set [2,_posZ];" \n
       "	_veh move _pos;" \n
       "};" \n
       "" \n
       "if (!simulationenabled _veh) then {" \n
       "	_vSpawned = _vSpawned + 1;" \n
       "	_veh enablesimulation true;" \n
       "	_veh hideobject false;" \n
       "};"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Loop">*/
        class Loop
        {
          itemno = 5;
          priority = 1.000000;
          to="Wait";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"_v = _v + 1;" \n
           "_v < _listVehsCount"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Return">*/
        class Return
        {
          itemno = 1;
          priority = 0.000000;
          to="Loop_Reset";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Exit">*/
    class Exit
    {
      name = "Exit";
      itemno = 15;
      init = /*%FSM<STATEINIT""">*/"""No helicopters created"" call bis_fnc_error;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
      };
    };
    /*%FSM</STATE>*/
  };
  initState="ambient_Helicopt";
  finalStates[] =
  {
    "Exit",
  };
};
/*%FSM</COMPILE>*/

BIS_fnc_ambientPlanes

/*%FSM<COMPILE "C:\BIS\fsmeditor\scriptedFSM.cfg, ambientPlanes">*/
/*%FSM<HEAD>*/
/*
item0[] = {"ambientPlanes",0,250,-150.000000,-150.000000,-50.000000,-100.000000,0.000000,"ambientPlanes"};
item1[] = {"True",8,218,-150.000000,-75.000000,-50.000000,-25.000000,0.000000,"True"};
item2[] = {"Find_nearest_air",2,250,-150.000000,0.000000,-50.000000,50.000000,0.000000,"Find" \n "nearest airport"};
item3[] = {"Delay",4,218,-275.000000,0.000000,-175.000000,50.000000,0.000000,"Delay"};
item4[] = {"No_airports",4,218,-25.000000,-150.000000,75.000000,-100.000000,1.000000,"No" \n "airports"};
item5[] = {"EXIT",1,250,100.000000,-150.000000,200.000000,-100.000000,0.000000,"EXIT"};
item6[] = {"Plane",4,218,-25.000000,0.000000,75.000000,50.000000,1.000000,"Plane"};
item7[] = {"Plane",2,4346,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Plane"};
item8[] = {"Reset",2,250,-275.000000,-75.000000,-175.000000,-25.000000,0.000000,"Reset"};
link0[] = {0,1};
link1[] = {0,4};
link2[] = {1,2};
link3[] = {2,3};
link4[] = {2,6};
link5[] = {3,8};
link6[] = {4,5};
link7[] = {6,7};
link8[] = {7,1};
link9[] = {8,1};
globals[] = {25.000000,1,0,0,16777215,640,480,1,13,6316128,1,-358.209259,176.210480,365.750031,-429.686035,604,899,1};
window[] = {2,-1,-1,-32000,-32000,775,-1232,-272,48,3,621};
*//*%FSM</HEAD>*/
class FSM
{
  fsmName = "ambientPlanes";
  class States
  {
    /*%FSM<STATE "ambientPlanes">*/
    class ambientPlanes
    {
      name = "ambientPlanes";
      itemno = 0;
      init = /*%FSM<STATEINIT""">*/"_vehCountMax =		[_this,0,5,[0]] call bis_fnc_param;" \n
       "_schnobble =			[_this,1,10000,[0]] call bis_fnc_param;" \n
       "_dirStep =				[_this,2,30,[0]] call bis_fnc_param;" \n
       "_heightMin = 500;" \n
       "_heightMax = 2000;" \n
       "_schnobbleOut = _schnobble * 0.75;" \n
       "_speedDefault = 20;" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "//--- Get plane classes" \n
       "_listClasses = [];" \n
       "_cfgVehicles = configfile >> ""cfgvehicles"";" \n
       "for ""_c"" from 0 to (count _cfgVehicles - 1) do {" \n
       "	_current = _cfgVehicles select _c;" \n
       "	if (isclass _current) then {" \n
       "		_currentClass = configname _current;" \n
       "		if (_currentClass iskindof ""plane"") then {" \n
       "			_scope = getnumber (_current >> ""scope"");" \n
       "			_ambientType = getnumber (_current >> ""ambientType"");" \n
       "			if (_scope > 1 && _ambientType > 0) then {" \n
       "				_listClasses set [count _listClasses,_currentClass];" \n
       "			};" \n
       "		};" \n
       "	};" \n
       "};" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "//--- Create vehicles" \n
       "_listVehs = [];" \n
       "_listClassesTemp = [];" \n
       "for ""_i"" from 0 to (_vehCountMax - 1) do {" \n
       "" \n
       "	//--- Classes exceeded; reset" \n
       "	if (count _listClassesTemp < 1) then {_listClassesTemp = _listClasses};" \n
       "	_class = _listClassesTemp call bis_fnc_selectrandom;" \n
       "	_listClassesTemp = _listClassesTemp - [_class];" \n
       "" \n
       "	_vehArray = [" \n
       "		[99,99,99 * _i]," \n
       "		0," \n
       "		_class," \n
       "		side player" \n
       "	] call bis_fnc_spawnVehicle;" \n
       "" \n
       "	_veh = _vehArray select 0;" \n
       "	_vehGrp = _vehArray select 2;" \n
       "	_listVehs set [count _listVehs,_veh];" \n
       "	_veh enablesimulation false;" \n
       "	_veh hideobject true;" \n
       "	_veh disableai ""target"";" \n
       "	_veh disableai ""autotarget"";" \n
       "	_veh setcombatmode ""blue"";" \n
       "	_veh setbehaviour ""careless"";" \n
       "" \n
       "	//_wp = _vehGrp addwaypoint [position _veh,0];" \n
       "	//_wp setwaypointstatements [""false"",""""];" \n
       "};" \n
       "_listVehsCount = count _listVehs - 1;" \n
       "" \n
       "//////////////////////////////////////////////////////////////////////////////////" \n
       "//--- Recognize airports" \n
       "_listAirports = [];" \n
       "_addAirport = {" \n
       "" \n
       "	//--- Ambient planes allowed?" \n
       "	_ilsRadius = getnumber (_this >> ""ilsAmbientPlanes"");" \n
       "	if (_ilsRadius > 0) then {" \n
       "" \n
       "		_class = configname _this;" \n
       "" \n
       "		//--- Position - extract only XY" \n
       "		_ilsPosition = getarray (_this >> ""ilsPosition"");" \n
       "		_ilsPosition resize 2;" \n
       "" \n
       "		//---Direction - original value is XZY, convert to XY" \n
       "		_ilsDirection = getarray (_this >> ""ilsDirection"");" \n
       "		_airportVector = [" \n
       "			_ilsDirection select 0," \n
       "			_ilsDirection select 2," \n
       "			_ilsDirection select 1" \n
       "		];" \n
       "" \n
       "		//--- Convert vector to direction" \n
       "		_airportDir = [_airportVector,[0,0,0]] call bis_fnc_dirto;" \n
       "" \n
       "		//--- Register" \n
       "		if (count _ilsPosition >= 2) then {" \n
       "			_listAirports set [" \n
       "				count _listAirports," \n
       "				_ilsPosition + [_airportDir]" \n
       "			];" \n
       "		};" \n
       "	};" \n
       "};" \n
       "" \n
       "//--- Primary" \n
       "_cfgWorld = configfile >> ""cfgworlds"" >> worldname;" \n
       "_cfgWorld call _addAirport;" \n
       "" \n
       "//--- Secondary" \n
       "_cfgSecondaryAirports = configfile >> ""cfgworlds"" >> worldname >> ""SecondaryAirports"";" \n
       "for ""_a"" from 0 to (count _cfgSecondaryAirports - 1) do {" \n
       "	_current = _cfgSecondaryAirports select _a;" \n
       "	if (isclass _current) then {" \n
       "		_current call _addAirport;" \n
       "	};" \n
       "};" \n
       "" \n
       "//--- Loop init" \n
       "_v = 0;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "No_airports">*/
        class No_airports
        {
          itemno = 4;
          priority = 1.000000;
          to="EXIT";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"count _listAirports < 1"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "True">*/
        class True
        {
          itemno = 1;
          priority = 0.000000;
          to="Find_nearest_air";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Find_nearest_air">*/
    class Find_nearest_air
    {
      name = "Find_nearest_air";
      itemno = 2;
      init = /*%FSM<STATEINIT""">*/"//--- Find nearest airport" \n
       "_veh = vehicle player;" \n
       "_airport = [0,0,0,0];" \n
       "_disMin = 10e10;" \n
       "{" \n
       "	_disTemp = [_x,_veh] call bis_fnc_distance2D;" \n
       "	if (_disTemp < _disMin) then {" \n
       "		_airport = _x;" \n
       "		_disMin = _disTemp;" \n
       "	};" \n
       "} foreach _listAirports;" \n
       "" \n
       "//--- Airport position and direction" \n
       "_airportPos = [" \n
       "	_airport select 0," \n
       "	_airport select 1," \n
       "	0" \n
       "];" \n
       "_airportDir = _airport select 2;" \n
       "_airportDis = _airportPos distance _veh;" \n
       "" \n
       "//--- Get nearest 30� directions from airport" \n
       "_airportDirFrom = ([_airport,_veh] call bis_fnc_dirto) + 360;" \n
       "" \n
       "_airportDirFromLower = _airportDirFrom - (_airportDirFrom % _dirStep);" \n
       "_airportDirFromUpper = _airportDirFromLower + _dirStep;" \n
       "_airportDirFromArray = [_airportDirFromLower,_airportDirFromUpper];" \n
       "" \n
       "//--- Position planes" \n
       "_distanceLimit = viewdistance;" \n
       "" \n
       "//--- Delay" \n
       "_time = time;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "Plane">*/
        class Plane
        {
          itemno = 6;
          priority = 1.000000;
          to="Plane";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"_v < _listVehsCount"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
        /*%FSM<LINK "Delay">*/
        class Delay
        {
          itemno = 3;
          priority = 0.000000;
          to="Reset";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"(time - _time) > 10 && !isnull player"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "EXIT">*/
    class EXIT
    {
      name = "EXIT";
      itemno = 5;
      init = /*%FSM<STATEINIT""">*/"""No airports found" \n
       """ call bis_fnc_error;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Plane">*/
    class Plane
    {
      name = "Plane";
      itemno = 7;
      init = /*%FSM<STATEINIT""">*/"_plane = _listVehs select _v;" \n
       "" \n
       "if (_plane distance _veh > _distanceLimit) then {" \n
       "" \n
       "	//--- Random vector" \n
       "	_vehDir = _airportDirFromArray select (_v % 2);" \n
       "	_vehLanding = abs ((((_vehDir - _airportDir) + 360) % 360) - 180) < 90;" \n
       "" \n
       "	//--- Random pos" \n
       "	_vehDis = (_airportDis - _schnobble) max 0;" \n
       "	if (_vehLanding) then {_vehDis = _vehDis + 2 * _schnobble};" \n
       "	_vehPos = [_airportPos,_vehDis,_vehDir] call bis_fnc_relpos;" \n
       "" \n
       "" \n
       "" \n
       "	//--- No other planes around" \n
       "	if ({[_vehPos,_x] call bis_fnc_distance2D < _schnobbleOut} count _listVehs == 0) then {" \n
       "" \n
       "		//--- Set height" \n
       "		_vehPosZ = ((_vehDis / 8) min _heightMax max _heightMin) + _vehDir;" \n
       "		_vehPos set [2,_vehPosZ];" \n
       "" \n
       "		//--- Random direction (from/to airport)" \n
       "		if (_vehLanding) then {_vehDir = _vehDir + 180};" \n
       "" \n
       "		//--- Velocity" \n
       "		_vehVelocity = [sin _vehDir * _speedDefault,cos _vehDir * _speedDefault,0];" \n
       "" \n
       "		_plane setpos _vehPos;" \n
       "		_plane setdir _vehDir;" \n
       "		_plane setvelocity _vehVelocity;" \n
       "		_plane flyinheight _vehPosZ;" \n
       "		_plane enablesimulation true;" \n
       "		_plane hideobject false;" \n
       "" \n
       "		//--- Land" \n
       "		if (_vehDis < 2000 && _vehLanding) then {" \n
       "			_plane land ""land""" \n
       "		} else {" \n
       "			_plane land ""none"";" \n
       "			_wpPos = [_airportPos,_vehDis * 5,_vehDir] call bis_fnc_relpos;" \n
       "			_plane domove _wpPos;" \n
       "			//[group _plane,1] setwaypointposition [_wpPos,0];" \n
       "" \n
       "			//--- Take off" \n
       "			if (_vehDis < 100 && {_x distance _airportPos < 500} count _listVehs == 0) then {" \n
       "					_plane setvelocity [0,0,0];" \n
       "					_plane setpos _airportPos;" \n
       "					_plane setdir _airportDir;" \n
       "			};" \n
       "		};" \n
       "	} else {" \n
       "" \n
       "		//--- Disable" \n
       "		if (_plane distance _veh > _distanceLimit) then {" \n
       "			//_plane setpos [99,99,99];" \n
       "			_plane enablesimulation false;" \n
       "			_plane hideobject true;" \n
       "		};" \n
       "	};" \n
       "};" \n
       "" \n
       "_v = _v + 1;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "True">*/
        class True
        {
          itemno = 1;
          priority = 0.000000;
          to="Find_nearest_air";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
    /*%FSM<STATE "Reset">*/
    class Reset
    {
      name = "Reset";
      itemno = 8;
      init = /*%FSM<STATEINIT""">*/"_v = 0;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "True">*/
        class True
        {
          itemno = 1;
          priority = 0.000000;
          to="Find_nearest_air";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };
    /*%FSM</STATE>*/
  };
  initState="ambientPlanes";
  finalStates[] =
  {
    "EXIT",
  };
};
/*%FSM</COMPILE>*/

THanks for considering.

Share this post


Link to post
Share on other sites

Hi R3vo, not sure to raise a new topic but do you plan to integrate creatSimpleObject for 3den decorative compositions? I'm sure you can do that before BI :)

Share this post


Link to post
Share on other sites

Why can't you move characters with the attribute of a animation?

Because of the BIS function is use. Next update will bring some improvements, but I cannot solve those issue entirely.

 

Hi R3vo, not sure to raise a new topic but do you plan to integrate creatSimpleObject for 3den decorative compositions? I'm sure you can do that before BI :)

 

Good idea. I might even have an idea how to achieve that.

 

 

Anyway to add the ambientFlyBy, ambientHelicopters and ambientPlanes in the functions in arma 3 function viewer. I found these while looking for some functions in function viewer.

 

BIS_fnc_ambientFlyby

 

I am already working on that! ;) Should be ready with the next update.

 

(Btw: Next time put long scripts into a spoiler. This much scrolling kills my mouse wheel ;)   )

Share this post


Link to post
Share on other sites

Is it possible to add a sleeping anim. It would be cool in mission making where you can sneak up on a barracks where the Opfor is sleeping and take them out if not detected.

  • Like 1

Share this post


Link to post
Share on other sites

Hi seem to see an issue where if I choose a player to be a "regular medic", then I check its attributes later it has either lost "regular medic" status and become a "specialist" or all properties goes back to default. Same thing happens with the Engineer.

Share this post


Link to post
Share on other sites

Hi seem to see an issue where if I choose a player to be a "regular medic", then I check its attributes later it has either lost "regular medic" status and become a "specialist" or all properties goes back to default. Same thing happens with the Engineer.

 

Thanks for your feedback. Will be fixed in the upcoming version.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×