Posted: . At: 3:32 PM. This was 5 years ago. Post ID: 13099
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to have a jet or helicopter fly by a position at a certain time.


There is a nice Arma 3 command that will allow a mission designer to have a nice ambient flyby of a jet plane or a helicopter. This would be very nice for a mission, and would add some atmosphere.

This example has a jet flying from one location to another. When it reaches the destination, it will be deleted.

ambFlyby = [[23028.3,7253.24,0.000114441], [11716.8,22903.1,-0.00111389], 300, "FULL", "O_Plane_Fighter_02_Cluster_F", WEST] call BIS_fnc_ambientFlyBy;

This example has it flying from the object named house1 to the player.

ambFlyby = [getpos house1, getPosATL player, 300, "FULL", "O_Plane_Fighter_02_Cluster_F", EAST] call BIS_fnc_ambientFlyBy;

This is one very useful function indeed. It allows running the script multiple times if you wish to have more than one jet following each other.

Use this scripting command to get the role name of the player. Very useful in a script that returns player information.

(configFile >> "CfgVehicles" >> TypeOf player >> "displayName") call BIS_fnc_GetCfgData;

This is another example of the ambient flyby script. This has a huge TU-95 Bear flying past.

ambFlyby = [[23028.3,7253.24,0.000114441], [11716.8,22903.1,-0.00111389], 300, "FULL", "RHS_TU95MS_vvs_tambov", EAST] call BIS_fnc_ambientFlyBy;

Spawn a civilian next to the player. If this is run multiple times, you will get multiple civs spawning.

_agent = createAgent ["C_man_shorts_1_F", position player, [], 0, "FORM"];
Spawning multiple civilians in the Arma 3 editor with debug console.
Spawning multiple civilians in the Arma 3 editor with debug console.

Finally, how to spawn a random machine gun in the AO. The position _randPos14 needs to be given, but this works very well indeed.

switch (_RandCorp) do {
 
	case 0: {
		sleep 5;
		_mg13 = createVehicle ["rhs_KORD_high_MSV", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
	case 1: {
		sleep 5;
		_mg13 = createVehicle ["LOP_AFR_OPF_Static_AT4", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
	case 2: {
		sleep 5;
		_mg13 = createVehicle ["LOP_AFR_OPF_Static_AGS30_TriPod", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
	case 3: {
		sleep 5;
		_mg13 = createVehicle ["LOP_AFR_OPF_Static_SPG9", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
	case 4: {
		sleep 5;
		_mg13 = createVehicle ["LOP_AFR_OPF_Static_Kord_High", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
	case 5: {
		sleep 5;
		_mg13 = createVehicle ["LOP_AFR_OPF_Static_NSV_TriPod", _randPos14, [], 0, "CAN_COLLIDE"];
		_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
		((units _mgguy13) select 0) moveInGunner _mg13;
		_mgguy13 enableDynamicSimulation true;
	};
};

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.