Home   Help Search Login Register  

Author Topic: Mando Heliroute for ArmA2 (ACCEPTED)  (Read 7784 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Mando Heliroute for ArmA2 (ACCEPTED)
« on: 22 Aug 2009, 17:52:39 »
In case you need long range chopper trips and accurate landings anywhere whitout using any invisible or visible helipads  ;)

Mando Heliroute v1.3 for ArmA2

What probles does solve this script?
- If you give a destination really far away, ArmA engine stalls trying to solve the path and the chooper will refuse to move.
- If you order a chopper to land at destination, it will land anywhere except where you want it to land, much less on building roofs, between streets or at ship's decks.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #1 on: 22 Aug 2009, 21:50:13 »
Ahh, the script I've been waiting for since release.  :good:  Can now use AI-based helo insertions/extractions in my missions again!

Thanks for all your hard work :)

Offline Sakura_Chan

  • Members
  • *
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #2 on: 23 Aug 2009, 02:46:03 »
Here is the mission I was using, simply jump in the chopper before it can take off.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #3 on: 23 Aug 2009, 03:21:51 »
Sakura Chan, you are passing wrong parameters:
Code: [Select]
scr = [this, getpos landing, 100, true] execvm "mando_heliroute_arma.sqf"
--> The second parameter is an array of one or more positions for the route, not just a position

Code: [Select]
scr = [this, [getpos landing], 100, true] execvm "mando_heliroute_arma.sqf"
Aside of that, you are using v1.2, not v1.3

Offline Sakura_Chan

  • Members
  • *
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #4 on: 23 Aug 2009, 03:29:31 »
yes the init was off a bit, I didn't save it after I had corrected that problem.

Offline cleggy

  • OFPEC Patron
  • ****
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #5 on: 30 Aug 2009, 20:18:09 »
Hi forumites

I'm getting a corrupted archive on download. Dont think its me - other stuff is OK.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #6 on: 30 Aug 2009, 22:09:30 »
Link fixed, try again  ;)

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #7 on: 31 Aug 2009, 18:23:33 »
Hi,

Wonderful script. The landing precision is simply amazing.

2 remarks if you dont mind:

1 - It would be nice if the engine could stay on for a fast pickup/dropout

2 - Talking about fast pickup/dropout it would also be nice to have the option to land a bit faster even if it looses some precision in the process. Usefull for hot LZs.

Hope you'll consider those additions. Your script would be perfect for any situation with them.

Fantastic work

Cheers

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #8 on: 31 Aug 2009, 20:17:38 »
This is already considered, set to false the "land" parameter, the chopper will go to the indicated position and will keep there loitering, then you can trigger any rope script you want to use there.

Offline cleggy

  • OFPEC Patron
  • ****
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #9 on: 31 Aug 2009, 21:34:04 »
Greetings

Thx for fixing the download Mandoble.
I'm using your script with a spawned helo. A couple of times its overshot the LZ and has had to come around for a second go at landing. Is there a minimum distance I should have between spawn point and LZ?

Also does the orientation of the destination logic have a bearing on the attitude of the helo when landing?

Finally, an observation: The helo stops a few feet (metres) off the ground and shuts down the engine. It then drops gracefully to the ground, just looks a bit odd.

Sorry if I seem picky, this script is, after all, a work of genius!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #10 on: 31 Aug 2009, 21:56:19 »
Hi Cleggy,
about the chopper overshoting destination and then turning around to reach exact position, well, it is how ArmA2 pilots drive now, they are quite quite unnaccurate when you tell them to go to any place, they may overshot 50% of the times. This is something I cannot fix (BIS should do something about that). Once the chopper gets quite slow my "guiding" script triggers and moves the chopper to final destination, but not before (the effect would be too brutal and unreallistic).

And about the stopping engine when still on air, the problem is that if I leave the chopper go engine on till ground, then Arma2 makes the chopper to "JUMP" hight and keep there. So the trick consist into drive the chopper controlling its velocity vector till quite close to the ground, stop the engine there in a tight loop, because AI tries to switch it on all the time, and wait till the chopper is grounded end engine off. Just at this time the AI stops any interference, they dont try to switch on the engine and keep flying again by their own until commanded.

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #11 on: 08 Sep 2009, 07:59:53 »
Hey Mandoble!

So I'm the guy who PM to you, but maybe this topic is already public.
Well - to the public - the problem is: the heli turn off the engine when land, but in a realistic insertation, the chopper doesn't turn off the engine.

I rewrite this area of youre code:
Code: [Select]
if (_landing) then
{
   _engineoff = false;
   while {(!_engineoff) && (alive _pilot) && (damage _heli < 0.5)} do
   {
      if ((getPos _heli select 2) > ((_endpos select 2) + 1)) then
      {
         _heli setDir _dir;
         if ((getPos _heli select 2) > ((_endpos select 2) + 5)) then
         {
            _heli setVelocity [0,0,-7];
         }
         else
         {
            _heli setVelocity [0,0,7*((getPos _heli select 2)-(_endpos select 2))/-5 min -1];
         };
      }
      else
      {
         _engineoff = true;
         _heli setVelocity [0,0,-0.5];
      };
      Sleep 0.01;
   };

   /*
   for [{_i = 0},{_i < 100},{_i = _i + 1}] do
   {
      _heli setVelocity [0,0,-0.2];
      Sleep 0.05;
   };
   */

   {unassignVehicle _x;} forEach units group player;

   while {!({_x in _heli} count units group player == 0)} do
   {
      _heli setVelocity [0,0,-0.5];
      Sleep 0.05;
   };

   if (!(alive _pilot) || (damage _heli >= 0.5)) exitWith {};

   _heli setVariable ["mando_heliroute", "waiting"];

}
else
{
   _heli setVariable ["mando_heliroute", "waiting"];
};

I replace the action ["ENGINEOFF"] to a local variable:  _engineoff.

And you mentioned that if you don't turn the engine off, the chopper - while wait - start to slowly rise. That's true. In my solution was a loop, what _heli setVelocity [0,0,-0.5]; while my men jump out from the heli.
Of course it's not a general solution, but enough for me.

I saw a tip in the "Tip of the month" topic to count the non-crew passenger in a vehicle. Maybe it could be general to check it in that loop. But I don1t know, because what if the designer want a team to get IN to the chopper.
Fix bayonet!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #12 on: 08 Sep 2009, 08:57:29 »
The problem there is that it applies only to a very particular case  :scratch:

Offline bardosy

  • Honoured Contributor
  • ***
  • campaign designer
    • CartooDiv
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #13 on: 08 Sep 2009, 09:27:33 »
OK. I understand, but what is your opinion about an other global variable mando_heliroute_someting and if it's false, the script push the chopper down while this variable is true. And the mission designer can use this variable for anything what (s)he want.  :whistle:
Fix bayonet!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Heliroute for ArmA2 (ACCEPTED)
« Reply #14 on: 09 Sep 2009, 11:14:45 »
The  new version, not public yet, has a parameter to determine who the "landing" will be and so far it admits two modes:
- As current one, chopper will land and will stop the engine just before touching down.
- Chopper will descend and will keep loitering 1m above ground.

The second way works fine for players, but not for AI. AI will refuse to board that chopper even being loitering still quite close to the ground. I may add a third option with your proposed landing procedure there too.