Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Helicopter pilots fly mode

  1. #1
    http://img361.imageshack.us/my.php?i...npilotsuq3.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!




  2. #2
    CWR² Developer Jakerod's Avatar
    Join Date
    Jul 29 2002
    Location
    Chicago, IL, USA
    Posts
    4,055
    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.




  3. #3
    First Sergeant Taurus's Avatar
    Join Date
    Jan 9 2002
    Location
    Sweden
    Posts
    863
    Author of the Thread

    Thumbs up

    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




  4. #4
    CWR² Developer Jakerod's Avatar
    Join Date
    Jul 29 2002
    Location
    Chicago, IL, USA
    Posts
    4,055
    Quote Originally Posted by (The_Taurus @ Nov. 06 2008,05:52)
    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.

  5. #5
    First Sergeant Taurus's Avatar
    Join Date
    Jan 9 2002
    Location
    Sweden
    Posts
    863
    Author of the Thread
    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 &#34;Added speed&#34;;
    _vehicle setVelocity &#91;&#40;_vel select 0&#41;+&#40;sin _dir*_speed&#41;,&#40;_vel select 1&#41;+ &#40;cos _dir*_speed&#41;,&#40;_vel select 2&#41;&#93;;[/QUOTE]
    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&#39;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.




  6. #6
    CWR² Developer Jakerod's Avatar
    Join Date
    Jul 29 2002
    Location
    Chicago, IL, USA
    Posts
    4,055
    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&#39;t flare at all I don&#39;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&#39;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&#39;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&#39;t notice it slowing it down but it also didn&#39;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&#39;t working now I was using the wrong names for the speeds.

    EDIT: I&#39;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.




  7. #7
    First Sergeant Taurus's Avatar
    Join Date
    Jan 9 2002
    Location
    Sweden
    Posts
    863
    Author of the Thread

    Red face

    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&#39;s because Arma doesn&#39;t like to be alt+tabbed that much.

    Both trigger and script worked perfectly and I was getting more happy.

    However... that didn&#39;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&#39;t matter) from the LZ, and a ZSU-23-4, putting that one so it couldn&#39;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&#39; 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&#39;t fly past the Unload WP he still has the front turned to the enemy, and the gunners can&#39;t shoot back.
    Pilot gets heavier with some led and dies.
    Wind shields on a UH60 isn&#39;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&#39;s what I&#39;m doing
    http://img142.imageshack.us/my.php?i...h60messzr4.jpg
    Removing the enemy and its eye candy all over

    Thanks for the inputs so far tho&#39;




  8. #8
    CWR² Developer Jakerod's Avatar
    Join Date
    Jul 29 2002
    Location
    Chicago, IL, USA
    Posts
    4,055
    If this isn&#39;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&#39;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&#39;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&#39;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.

  9. #9
    First Sergeant Taurus's Avatar
    Join Date
    Jan 9 2002
    Location
    Sweden
    Posts
    863
    Author of the Thread
    Quote Originally Posted by (Jakerod @ Nov. 07 2008,09:35)
    I don&#39;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&#39;t rely on waypoints :/

    Looking forward to read your progress




  10. #10
    CWR² Developer Jakerod's Avatar
    Join Date
    Jul 29 2002
    Location
    Chicago, IL, USA
    Posts
    4,055
    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&#58;When Helicopter is present///Init&#58; uh60 flyInHeight 0; uh60ap=1[/QUOTE]
    Trigger 2<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Type&#58; Switch ///Condition&#58; uh60ap==1///6 second delay/// synced to WP2[/QUOTE]
    Trigger 3<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Type&#58; Switch ///Condition&#58; uh60ap==1///Init&#58; UH60 flyinheight 20/// 20 second delay [/QUOTE]

    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&#39;&#39;s death and sometimes helicopter&#39;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.




Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •