-ami- mofo 13 Posted April 13, 2014 I have a script which worked great, spawned an Indi aircraft and had it fly at a set height through waypoints and keep cycling through those waypoints all day. ag1spawn = [getMarkerPos "ag1spawn", 0, "I_Plane_Fighter_03_CAS_F", INDEPENDENT] call bis_fnc_spawnvehicle; _ag1air = ag1spawn select 0; //the aircraft _ag1crew = ag1spawn select 1; //the units that make up the crew _ag1 = ag1spawn select 2; //the group {_x allowFleeing 0} forEach units _ag1; _ag1height = 700; _ag1air flyinheight 200; _ag1air setpos [getposATL _ag1air select 0, getposATL _ag1air select 1, _ag1height]; reldir = [getmarkerpos "ag1spawn", getmarkerpos "ag1move1"] call BIS_fnc_dirTo; _ag1air setdir reldir; _waypoint0 = _ag1 addwaypoint [getmarkerpos "ag1move1",0]; _waypoint0 setwaypointtype"Move"; _waypoint1 = _ag1 addwaypoint [getmarkerpos "ag1move2",0]; _waypoint1 setwaypointtype"Move"; _waypoint2 = _ag1 addwaypoint [getmarkerpos "ag1move3",0]; _waypoint2 setwaypointtype"Move"; _waypoint0 = _ag1 addwaypoint [getmarkerpos "ag1move1",0]; _waypoint0 setwaypointtype"Move"; _waypoint0 setwaypointtype "CYCLE"; "Cool" I thought, I can use this again whenever I need it on some other type of aircraft. All I have to do is change the aircraft classname and side. So today I changed the I_Plane_Fighter_03_CAS_F and INDEPENDENT to O_Heli_Attack_02_F and EAST. That's all I changed. What I got was a heli that spawned at 700 and stayed at 700 and went to the first marker and then just did loops around it. :confused: I thought OK this is Arma and you expect everything to be difficult, maybe the script just doesn't like helicopters for some weird reason? So I put back in a fixed wing but a different type. I put in O_Plane_CAS_02_F and what I got was a plane that spawned at 700, went down to 200 and followed all the waypoints as it should... But then it stopped around waypoint3 and just did loops around it, no cycle at all. :confused: So 3 different aircraft and 3 different results with the only difference being the aircraft classname and side being changed. Oh btw when I put the original aircraft classname and side back in it worked perfectly again :confused::confused::confused: I'm hoping that somebody can tell me what I did wrong or is this truly just another example on how dodgy and irritating arma editing is? Share this post Link to post Share on other sites
f2k sel 164 Posted April 13, 2014 (edited) I'm thinking it's reldir it's a global variable so effects all scripts make it local _reldir Only guessing, That would only cause a change in direction once so it's hard to see it having a continuous effect. Edited April 13, 2014 by F2k Sel Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 13, 2014 I'd say the fact that it works all the time every time only for the original aircraft I had in there when I pieced this script together is pretty odd. Why should that matter at all? And the fact that not only it doesn't work for the other two types of aircraft but it doesn't even not work the same way is even more baffling. Does.....not.....make.....sense :annoy: Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted April 13, 2014 I'd say the fact that it works all the time every time only for the original aircraft I had in there when I pieced this script together is pretty odd. Why should that matter at all?And the fact that not only it doesn't work for the other two types of aircraft but it doesn't even not work the same way is even more baffling. Does.....not.....make.....sense :annoy: Choppers in general have issues flying at higher altitudes (at least in the arma series) try to reduce the altitude to 200m and check again. Cheers Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 14, 2014 Tested it some more and what I found is that it only affects aircraft and what I also just noticed is that if you have their speed limited it works fine. So maybe it's to do with a speed issue? Faster aircraft maybe miss the markers more and therefore do weird things like double back and loops etc? Is there maybe a way to make it so that the marker area to pass through is larger and therefore more easy for them to achieve? If so I'd like to test it. Share this post Link to post Share on other sites
f2k sel 164 Posted April 14, 2014 You could be right, they may not be able to turn tightly enough to hit the waypoint completion although for aircraft I think it's 150 meters also check the height as Grumpy-Old-Man suggests as this can also be a real issue. Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 15, 2014 Is there a way to make a marker area larger then? Share this post Link to post Share on other sites
f2k sel 164 Posted April 15, 2014 just in crease the completion radius in waypoint editor menu. Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 15, 2014 I'm calling this from a spawning script though, not placed editor waypoints. _waypoint0 = _ag1 addwaypoint [getmarkerpos "ag1move1",0]; _waypoint0 setwaypointtype"Move"; Is there a way to alter this? I tried increasing the 0 (tbh I don't know what the 0 does lol) but anyway that didn't work. Is there a way through the script? or can it only be done if it's editor placed? Share this post Link to post Share on other sites
f2k sel 164 Posted April 15, 2014 try adding this after setwaypointtype"Move"; _waypoint0 setWaypointCompletionRadius 500; _waypoint0 setWaypointStatements ["true", "hint 'wp0'"]; you should get a hint when the waypoint has completed and aircraft should start moving to next wp Share this post Link to post Share on other sites
f2k sel 164 Posted April 15, 2014 Actually you can forget about the messing with waypoints it's clearly a bug. Airplanes seem fine to me at 700 they follow perfectly. Choppers at 700 fly around waypoint 1 Choppers at 500 start off alright but second time around loop at waypoint 1 Choppers at 400 start ok but break into two groups at waypoint 2 some looping some carry on choppers at 300 are mostly ok but the odd one loops around waypoint 2 Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 15, 2014 hmmmm a bug? not in Arma! lol Thanks for taking the time to have a look mate. I guess the thing to do is don't make any missions that rely on aircraft faultlessly following any waypoints. Share this post Link to post Share on other sites
f2k sel 164 Posted April 16, 2014 (edited) Never mind I thought I was onto something but it didn't work out. Edited April 16, 2014 by F2k Sel Share this post Link to post Share on other sites