Taurus 20 Posted November 6, 2008 http://img361.imageshack.us/my.php?image=armamoronpilotsuq3.jpg Speed Modes: Orange = Full/Normal Yellow = "in between"-phase Green = Limited. The arrow represents the ground. Two scenarios Above: The one I want to accomplish without scripting the whole flight with setvector setvelocity etc etc. i.e. Flying the helicopter via scripts instead of the AI flying it. Below: ArmA helicopter pilots. The ArmA pilots gets shot down by AA fire 98% of the times, I want this helicopter to land(transport unload) behind a hill. I've tried FlyInHeight But as soon as the helicopters speedMode changes the pilot promptly gains height to "lower speed". Same goes with waypoints, as we all know from the very beginning of OFP helicopter pilots are very precise in their "Move to" commands and can't just fly past an waypoint banking their helicopter and turn smoothly. Perhaps someone already did a script which accomplish this, please let me know because I couldn't find anything whilst searching. Thanks in advance! Share this post Link to post Share on other sites
jakerod 254 Posted November 6, 2008 Solution to waypoint problem: You have two waypoints WP1 and WP2. WP1 is straight ahead of the helicopter (the one it is heading towards) and WP2 is 90 degrees to its left. Place a trigger where you want the helicopter to begin its turn. Group trigger to helicopter. Set trigger to Vehicle Present. Set trigger to Type: Switch. Sync trigger with WP1. Now when the helicopter hits the trigger it should bank towards WP2 instead of stopping and then going. Note: It is possible it might gain a bit of altitude. If you place the trigger right though I think you can avod it. Working on solution to speed problem... Set its flyinheight mode lower when it gets closer to slowing down. It didn't bank up when I tried this. However it did hit the water but im sure there is a way to make it so that you can tell it to climb a bit if it gets too low. Share this post Link to post Share on other sites
Taurus 20 Posted November 6, 2008 Thanks Jakerod! The waypoint issue could be tweaked to work as I want. It should have been easier if BIS just made Move waypoints for helicopters(aircrafts) less precise if in a cycle. If the mission editor wanted it to halt at one of the waypoints some other type of waypoint could be used. Like hold or something with timeout conditions. I think I'll have all helicopter pilots go "Limited", yes the player will get annoyed about it going slow, but I don't have time right now to get into the setVectorDir science :/ Thanks again for your assistance Share this post Link to post Share on other sites
jakerod 254 Posted November 6, 2008 I think I'll have all helicopter pilots go "Limited", yes the player will get annoyed about it going slow, but I don't have time right now to get into the setVectorDir science :/ See when I did it I used the whole setspeedmode command but it didn't seem to do anything. Even with it going fast it still didn't pop up very much. I tested it with a shilka on the otherside of the hill and it never fired at it after it went behind the hill. I think it is more about tweaking the flyinheight command than the speed. 5 seemed to work fine but it was also approaching over water too so no trees or small hills or anything to stop it. Good luck with it though. Share this post Link to post Share on other sites
Taurus 20 Posted November 6, 2008 hmm I seem not to have the same amount of luck. I've been experimenting with flyInHeight the last two hours or so, but to no avail. I also tried with setVelocity, but that either threw the helicopter backwards or nothing happened at all. But thats not ArmA's fault its just me who doesn't understand the maths behind <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vel = velocity _vehicle; _dir = direction _vehicle; _speed = 10; comment "Added speed"; _vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2)]; To make it slow down instead of increasing speed. The code above just hurls the helicopter forward in a very unrealistic manner. This could ofc be done in a loop to increment it smoother. If I was able to slow down the speed to about 60 everything would be ok, as "Limited" for an UH60 is 50-60 Then it wouldn't raise in height to slow down the speed when it hits the "Limited" WP. Or we, the ones not too eager of scripting everything, could just agree with this game being a infantry simulator and leave the aircrafts for a while. Share this post Link to post Share on other sites
jakerod 254 Posted November 6, 2008 EDIT: Map Editor Setup EDIT #500: Now it suddenly stopped working. It either flares or it clips a tree or building. Maybe you will have better luck though. That is how I get it set up. It doesn't flare at all I don't think. Try setting it up like that yourself. I think I have a flyinheight 25 in the helicopters init field too. UH60 Init Field: This flyinheight 25 UH60 is moving to a move waypoint beyond the Transport Unload WP. Trigger 1: UH60 setspeedmode "Normal" Note: There is an extra trigger here for the purpose of the mission im using to set it up ignore it. Trigger 2: UH60 flyinheight 5 Trigger 3: Switch: UH60 to Transport Unload WP. UH60 setspeedmode "limited" Effect: UH60 comes in over the water, over the buildings and trees (dispite the altitude of 5 command) stops in the field 5 meters above the ground, gains altitude and continues forward to the LZ. Im not sure if the gain altitude would be acceptable to you though. I don't think it ever went higher than how high it was flying when it came in. I am trying to get it to just land when it hovers before it moves forward but I haven't got it yet. ---- If you are using waypoints to slow down the speed I would recommend just using setspeedmode. As I said I didn't notice it slowing it down but it also didn't climb above the hill either. I just used it in a trigger and grouped the helicopter to it so that as it hit it the speedmode switched. I know why setspeedmode wasn't working now I was using the wrong names for the speeds. EDIT: I've got it for the most part. I am presently dealing with it stopping a bit before the LZ and going down to its altitude and then continuing on. Any chance you can tell me which direction the helicopter is coming in from and where your LZ is at or giving me a picture. I want to see if I can get this system working for your LZ. Share this post Link to post Share on other sites
Taurus 20 Posted November 7, 2008 I was to give this "the long finger salute" But you convinced me to try some more. I tried your trigger thing, and calculated the ranges to where the pilot begins his "approach run" i.e. unloading troops. 600 meters away from the WP. Knowing this I got the same result with a script, it took about 1,5 hours to complete with testing and all, + random CTD's because Arma doesn't like to be alt+tabbed that much. Both trigger and script worked perfectly and I was getting more happy. However... that didn't last long. When the UH60 is not in a 2k range of any targets everything is ok. STEALTH in conjunction with LIMITED works fine. Pilot flies slow, altitude never over 30 meters(set to 20 to begin with and 10 when it gets near the LZ) and touch down nicely. So I placed some east infantry 200-300 meters away(less in the picture below but it doesn't matter) from the LZ, and a ZSU-23-4, putting that one so it couldn't "see" the helicopter as it approaches as the helicopter flies low. As soon as the M-fkn pilot yells "CONTACT" he increases speed to 200 and flies over the "Transport unload" WP with about 500 meters, whilst trying to correct this he climbs to 60 - 100 meters and meanwhile, the door gunners are sitting: "hmm, this trigger thingy, I wonder what will happen if I press that one??" In the times when the pilot has the helicopter turned towards the threat that is. i.e. turning the helicopter so the gunners or atleast one of them can shoot back... CBA to script that too... They do NOT fire, even tho' I have "Engage at will". So the pilot gets killed, or the helicopter is disabled. or the ZSU-23-4 aka Shilka wakes up from afar and promptly downs the UH60. Forcing Limited and Stealth in the script does nothing to prevent the pilot to hurl the helicopter in to the skies. The random times when the pilot doesn't fly past the Unload WP he still has the front turned to the enemy, and the gunners can't shoot back. Pilot gets heavier with some led and dies. Wind shields on a UH60 isn't that thick. UH60 gunship to support infantry with MG fire anyone? This happens with the trigger thing too. Added to the first 1,5 hours some 4-5 more hours passed by to try to "over ride" the moronic AI pilots in Arma. I give up for now. [edit #30] Here's what I'm doing http://img142.imageshack.us/my.php?image=armauh60messzr4.jpg Removing the enemy and its eye candy all over Thanks for the inputs so far tho' Share this post Link to post Share on other sites
jakerod 254 Posted November 7, 2008 If this isn't at night try setting the UH60 to Careless. Then it should follow the waypoints perfectly. If it is night then its lights will be on but you might be able to force them off by constantly looping a script that turns them off. If that doesn't work and it still flies off try careless and never fire. Only problem is never fire will make it so that they wont hit that infantry. Maybe have them open fire once it lands. I think you are lucky that your approach is over water though. It should make it a bit easier. You don't even have trees in the way you might be able to set it lower. I would think a faster speed might work too if you change it to limited far enough out and set its flyinheight lower. Will see what I can come up with tomorrow (about 8 - 10 hours or so). I don't really need this for my mission but I think it would look nicer plus this has always bugged me since ofp and I might need it later on which is some of the reasons I am trying so hard at this. Share this post Link to post Share on other sites
Taurus 20 Posted November 7, 2008 I don't really need this for my mission but I think it would look nicer plus this has always bugged me since ofp and I might need it later on which is some of the reasons I am trying so hard at this. Neither do I, but I feel an airborne reinforcement will be needed in my next "project" Also that one needs to be somewhat dynamic, thus I can't rely on waypoints :/ Looking forward to read your progress Share this post Link to post Share on other sites
jakerod 254 Posted November 7, 2008 Map Editor Close Up on LZ UH60: Moving Full and Careless *Triggers Names start at top and move down Trigger A: Setspeedmode Normal Trigger B: Flyinheight 7 Trigger C: Setspeedmode Limited See LZ Close Up WP1 = Helicopters first Move Waypoint (Mentioned above) WP2 = Move Waypoint on Invisible H WP3 = Transport Unload Waypoint Trigger 1<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Condition:When Helicopter is present///Init: uh60 flyInHeight 0; uh60ap=1 Trigger 2<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Type: Switch ///Condition: uh60ap==1///6 second delay/// synced to WP2 Trigger 3<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Type: Switch ///Condition: uh60ap==1///Init: UH60 flyinheight 20/// 20 second delay Might need to change delay numbers depending on how many are in chopper. How it works: Chopper approaches beach flying low and fast. Hits beach it slows down (flares a bit but not high enough to get shot down). Chopper moves forward towards the LZ and flyinheight 0 makes it land. The Transport Unload waypoint is close enough and allows the men to get out. Helicopter waits for 20 seconds and the flies away to WP4. Problems: Helicopter still flares a bit so the buildings protect the blackhawk from being shot down but I think thats why you chose that spot. Gunners will fire back at infantry but generally can kill them fast enough to prevent pilot''s death and sometimes helicopter's damage or destruction. Normally the infantry is out by the time this happens though. I would recommend making it so that if the pilot is killed or helicopter immobilized that you switch the helicopter crews behavior to aware or combat or else they will get out and just stand there and never fire. Hope this helps. EDIT: Giving the infantry a get out waypoint nearby also helps. Share this post Link to post Share on other sites
Taurus 20 Posted November 7, 2008 Nope. Can't get it working. I have about the same setup as you have. Can not get the triggers and wps on the exact same spot Either I have the helicopter in careless all the way and the door gunners never return fire, not that this will help tho' see comment about WP2 Or the pilot makes that UH60 a plough if WP2 is set to "COMBAT" The odd occasion when the pilot didn't make that UH60 into a tool of agriculture the door gunners still wouldn't fire. If WP3 is set to "COMBAT" the pilot is "sniped out" at WP2. I also experimented with the flyInHeight but it seems the farmer inside that pilot is still there, or it is set too high and the Shilka downs the UH60 before it even hits the beach. Could you please PM me so I can send you my email address so you can send me your sample mission? [edit] Ok, so I piloted the UH60 and I can't get my door gunners to fire, I can not possibly assign targets for them one by one, "Engage at will" doesn't seem to work. Only time when they fire is if I fly over the enemy trying to crush them like bugs... Talking about bugs, is this a bug in Arma? I'm pretty sure they assigned their own targets a while back(1.08) [edit2] Ok, ranges ~100 meters and the MG opens up. Not even the Cobra gunner will engage "soft targets" in less than 100 meters with the MG. Good game! Gunners wont engage Getting upset with this now. Tired of babysitting the AI. Just LAWL! Do mind that the pilot in that UH60 is set to mind his own business, no flyInHeight or scripted events, just a simple "Transport unload" wp. Share this post Link to post Share on other sites
jakerod 254 Posted November 8, 2008 Was that helicopter picture taken in the one that I sent you? I never had that happen. I did however have it flip (a lot) as it went up that small hill from the ocean to the LZ. But I did have flyinheight set too low so that was my fault. Only other thing I could think of to try is to force it to come in at a certain angle and script its altitude down in .25 or .5 meter increments to make it look like its naturally landing. I don't think my mission looked to bad but I would like it to be easier and nicer looking. Share this post Link to post Share on other sites
Taurus 20 Posted November 9, 2008 Was that helicopter picture taken in the one that I sent you? No no. it wasn't As I mentioned I just checked what would happen if I let the pilot mind his own business. In yours the pilot gets killed and the door gunners won't engage tho' Same as they do in "my" version. Share this post Link to post Share on other sites
jakerod 254 Posted November 9, 2008 Was that helicopter picture taken in the one that I sent you? No no. it wasn't As I mentioned I just checked what would happen if I let the pilot mind his own business. In yours the pilot gets killed and the door gunners won't engage tho' Same as they do in "my" version. Thats really weird because whenever they detected someone on mine they fired. I originally had them off to the east of the LZ and that guy fired then I tried west and that one fired. Share this post Link to post Share on other sites
Taurus 20 Posted November 10, 2008 Thats really weird because whenever they detected someone on mine they fired. I originally had them off to the east of the LZ and that guy  fired then I tried west and that one fired. Hmm odd! However I can't have the pilot on carless and I don't like the idea of scripting the "turn light" off, I think it'll flicker on night missions. Not that the AI cares about light sources or areas lit up, but it'll look strange. but, unfortunately I had to give this idea with "flyInHeight" up as on Sharani there's trees. AI doesn't see trees nor bushes as we've learnt on the "hide and seek" missions vs AI The pilot and chops them down by crashing into them. The night missions are also a joke with the AI engaging targets they could not possibly know where they are, but that's a completely different subject. When I get completely bored some day I'll see if the AI can "check" if a tree is nearby and increase altitude accordingly. I know how to check nearest objects, but I dunno if trees are counted like a building or object and this command has to have a position x meters in front of the helicopter which it is facing. [edit] ther's a command forceSpeed but that doesn't work If it would we could be saved from the pilot to increasing speed when he enters the "ZOMG COMBATZZZZ"-frenzy. I thank you for your help Jakerod, and I do hope your mission works with helicopter pilots as you want to. Share this post Link to post Share on other sites
Dark SudoNix 1 Posted January 24, 2009 so, there is no way to get the helo to just bank at the waypoints instead of stopping and then turnig ? ? ? that is so annoying that they made it like that... without using any scripts or command lines... annoying as hell!!! Share this post Link to post Share on other sites
jakerod 254 Posted April 10, 2010 so, there is no way to get the helo to just bank at the waypoints instead of stopping and then turnig ? ? ? that is so annoying that they made it like that... without using any scripts or command lines... annoying as hell!!! I realize that this is an incredibly old thread but I am referencing this in a post in the ArmA II section and so I wanted to answer this question in case someone comes across it later. In order to do this group the helicopter with the waypoints to a trigger (you'll have to test to see how big, at least 100 though) that is around the waypoint you want it to turn on. Set the trigger to switch and sync it to the trigger you want it to turn at. This will maintain the helicopters speed but it will turn towards the next waypoint in the line in a more fluid manner. Share this post Link to post Share on other sites