Jump to content

Recommended Posts

16 minutes ago, 2RGT_NEON said:

HELLO, THE MIX OF TRIAL NOT LEAVE NE HELICOPTERS NOT EVEN THE PLANE.

 

Sorry but I didn't understand what you mean..

Share this post


Link to post
Share on other sites

Your script does not work. I keep getting the following error:

 

17:39:18 Error in expression <, 30, [10, 20, 40], refuel1, 450] spawn DEVAS_AirPatrol;
};
setViewDistance 2500>
17:39:18   Error position: <DEVAS_AirPatrol;
};
setViewDistance 2500>
17:39:18   Error Undefined variable in expression: devas_airpatrol
17:39:18 File C:\Users\Ian\Documents\Arma 3 - Other Profiles\[FTS]KRDucky\mpmissions\devostest.lingor3\init.sqf, line 4

 

This is what the init.sqf currently looks like:

[] execVM "AirPatrol\AirPatrolInit.sqf";

if (isServer) then 
{
	_handle = [[Texan1, Texan2], [["pos1", 280], ["pos2", 250], ["pos3", 200], ["pos4", 200], ["pos5", 200], 1500, 200, 30, [10, 30, 60], refuel1, 150]] spawn DEVAS_AirPatrol;
};

I have also tried this:

if (isServer) then {

	[] execVM "AirPatrol\AirPatrolInit.sqf"; 
	_handle = [Texan1, [["pos1", 150], ["pos2", 250], ["pos3", 350], ["pos4", 450], ["pos5", 300]], 1500, 280, 30, [10, 20, 40], refuel1, 450] spawn DEVAS_AirPatrol;
	};
setViewDistance 2500;

 

Share this post


Link to post
Share on other sites

put a sleep in between if you start patrol right after initialization.

Copy paste following to your init.sqf and try

 

if (isServer) then 
{ 
    
    [] execVM "AirPatrol\AirPatrolInit.sqf";
    sleep 1;
    _handle = [Texan1, [["pos1", 150], ["pos2", 250], ["pos3", 350], ["pos4", 450], ["pos5", 300]], 1500, 280, 30, [10, 20, 40], refuel1, 450] spawn DEVAS_AirPatrol;
};

p.s. it is used for single vehicle so doing 

[Texan1, Texan2]

will never work

Share this post


Link to post
Share on other sites
15 minutes ago, Devastator_cm said:

put a sleep in between if you start patrol right after initialization.

Copy paste following to your init.sqf and try

 


if (isServer) then 
{ 
    
    [] execVM "AirPatrol\AirPatrolInit.sqf";
    sleep 1;
    _handle = [Texan1, [["pos1", 150], ["pos2", 250], ["pos3", 350], ["pos4", 450], ["pos5", 300]], 1500, 280, 30, [10, 20, 40], refuel1, 450] spawn DEVAS_AirPatrol;
};

p.s. it is used for single vehicle so doing 


[Texan1, Texan2]

will never work

now I get the following:

18:13:40 Error in expression <c_enemySides;

while {(count (waypoints group _Vehicle)) > 0} do {deleteWaypoint>
18:13:40   Error position: <group _Vehicle)) > 0} do {deleteWaypoint>
18:13:40   Error group: Type Group, expected Object
18:13:40 File C:\Users\Ian\Documents\Arma 3 - Other Profiles\[FTS]KRDucky\mpmissions\devostest.lingor3\AirPatrol\AirPatrol.sqf, line 30

 

Share this post


Link to post
Share on other sites

It looks like you are passing the group name (Texan1) instead of the vehicle name and I wrote in ReadMe file that it should be vehicle name and also in my sample mission I pass vehicle name... :face_palm:

 

From read me
 

Spoiler

 

The code parameters in the script-call are:

1. Aircraft's variable name

 

 

Share this post


Link to post
Share on other sites
On 3/13/2017 at 1:06 AM, Devastator_cm said:

It looks like you are passing the group name (Texan1) instead of the vehicle name and I wrote in ReadMe file that it should be vehicle name and also in my sample mission I pass vehicle name... :face_palm:

 

From read me
 

  Hide contents

 

The code parameters in the script-call are:

1. Aircraft's variable name

 

 

By variable name do you mean Classname? Because the variable name of the plane is Texan1. There is no group of vehicles.

Share this post


Link to post
Share on other sites

please send me a screenshot how you set the texan1 or send me your  mission file or check how I did the setup in sample mission 

Share this post


Link to post
Share on other sites
17 hours ago, Devastator_cm said:

please send me a screenshot how you set the texan1 or send me your  mission file or check how I did the setup in sample mission 

Mission File

Share this post


Link to post
Share on other sites
20 hours ago, linuxmaster9 said:

 

Looks like you 

1- Didn't listen what I wrote in my previous answers

2- Didn't check the sample mission which I prepared 

3- Didn't read the readme file

 

You put a name to the Group as Texan1.
I wrote clearly in read me and you can also see in sample missiona and you can also see in my replies to you it is not the way how it works.

You need to put the Texan1 as variable_name to the object which is the airplane and not the group and I wrote it man

 

On 13.03.2017 at 7:06 AM, Devastator_cm said:

It looks like you are passing the group name (Texan1) instead of the vehicle name and I wrote in ReadMe file that it should be vehicle name and also in my sample mission I pass vehicle name... :face_palm:

 

From read me
 

  Reveal hidden contents

 

The code parameters in the script-call are:

1. Aircraft's variable name

 

 

 :face_palm:

 

 

Share this post


Link to post
Share on other sites
1 hour ago, Devastator_cm said:

 

Looks like you 

1- Didn't listen what I wrote in my previous answers

2- Didn't check the sample mission which I prepared 

3- Didn't read the readme file

 

You put a name to the Group as Texan1.
I wrote clearly in read me and you can also see in sample missiona and you can also see in my replies to you it is not the way how it works.

You need to put the Texan1 as variable_name to the object which is the airplane and not the group and I wrote it man

 

 :face_palm:

 

 

I swear that I did when I placed the plane itself. I placed the name of the plane as Texan1. I did NOT group the plane. I double checked the plane in the editor and it said that the plane variable name was Texan1

Share this post


Link to post
Share on other sites
4 hours ago, Devastator_cm said:

ok sh*t happens.

Now it works or?

ill have to check. I just got back from work.

Share this post


Link to post
Share on other sites

Could you consider making this as a mod for the SP-players,please ?  Don`t care for fidelling with scripts and adding things myself.And a lot of others don`t mind very small mods,even if they have large packs. Thank you.:don11:

Share this post


Link to post
Share on other sites
3 minutes ago, teddymosart1 said:

Could you consider making this as a mod for the SP-players,please ?  Don`t care for fidelling with scripts and adding things myself.And a lot of others don`t mind very small mods,even if they have large packs. Thank you.:don11:

it is already for SP. its also for MP

Share this post


Link to post
Share on other sites

Encountered an issue with the script. It works when the aircraft is pre-spawned in editor. But when I spawn the aircraft via trigger it refuses to land when low on fuel. It just fly around in circles at the base waypoint.

This is the code I used in the trigger.

cap1_1 = createVehicle ["rhs_mig29s_vvs", getpos cap1_spawn, [],0,"NONE"];
cap1_1 setDir (getDir cap1_spawn);
createVehicleCrew cap1_1;
_handle = [cap1_1, [["cap1_wp1", 2000], ["cap1_wp2", 2000], ["cap1_wp3", 2000], ["cap1_wp4", 2000]], 3500, 400, 30, [10, 30, 60], airbase1, 150] spawn DEVAS_AirPatrol;

Any ideas @Devastator_cm?

Share this post


Link to post
Share on other sites

what is exactly cap1_spawn? Is it a marker?

 

Try this I rewrite with markers 

 

_pos = getMarkerPos ["cap1_spawn", false];  
_pos set [2, 100];  
_cap1_1 = createVehicle ["rhs_mig29s_vvs", _pos, [], 0, "FLY"];
createVehicleCrew _cap1_1; 
_handle = [_cap1_1, [["cap1_wp_1", 2000], ["cap1_wp_2", 2000], ["cap1_wp_3", 2000], ["cap1_wp_4", 2000]], 3500, 400, 30, [10, 30, 60], airbase1, 150] spawn DEVAS_AirPatrol;
 

btw in your code there were so many weird characters for text. I think it was not UTF charachterset. So it is better if you do copy paste the texts which I have sent

Share this post


Link to post
Share on other sites
13 hours ago, Devastator_cm said:

what is exactly cap1_spawn? Is it a marker?

 

btw in your code there were so many weird characters for text. I think it was not UTF charachterset. So it is better if you do copy paste the texts which I have sent

Odd, I copied and paste the code directly from Notepad++, which was set to UTF.

Anyway, cap1_spawn is a grasscutter object that I use as a spawn marker.

I tried your rewrite, issue still persists. The aircraft just loiters around once they reached the TR UNLOAD waypoint in the script AirPatrolService.sqf. It works when they're already pre-spawned in editor. The issue comes up when the aircraft is spawned via trigger/script/debug window. 

Share this post


Link to post
Share on other sites

I spawned the aircraft like in above code and it works fine. Use markers for spawn point like I did

Share this post


Link to post
Share on other sites
On 1/10/2020 at 7:51 PM, Devastator_cm said:

I spawned the aircraft like in above code and it works fine. Use markers for spawn point like I did


The aircraft spawned fine. It's when they're low and fuel and RTB that's the part that didn't work. They just loiter over the last waypoint instead of landing and refueling.

Anyway found a workaround for the issue using landAt command instead. It works now.

Share this post


Link to post
Share on other sites

hmmm maybe I have a bug for airplanes. It works for helicopters but looks like failing by airplanes 😕

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

×