Home   Help Search Login Register  

Author Topic: Aircraft holding pattern script  (Read 3449 times)

0 Members and 1 Guest are viewing this topic.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Aircraft holding pattern script
« on: 13 Apr 2005, 07:55:44 »
Hello all,

I don't know if you have ever used fixed-wing aircraft in your missions. But if you have, you may have noticed that there is no way to make the plane "stay at" a specific location. Instead, once the plane completes its waypoint/domove/player order, it will just keep flying straight forever.

What this script does is it makes an aircraft fly in a stable, circular holding pattern.

This can make it surprisingly easy for the player to command fixed-wing aircraft, without being in one himself. Normally this requires an endless number of "fall back into formation" orders or similar, but this script lets the player put them into holding, until airsupport is required.

One quick note is that if you turn up the time accel, the aircraft will most likely break its holding pattern. In normal time accel, the aircraft also has a slight chance of breaking its pattern eventually.

Try out the demo mission and let me know what you think.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Blanco

  • Former Staff
  • ****
Re:Aircraft holding pattern script
« Reply #1 on: 13 Apr 2005, 08:18:04 »
WOW, that a whole mission dude :)
You did again, exellent script!
There's no need anymore to create your plane or keep him in position with setpos commands... just use this... brilliant.  :thumbsup:

 
Search or search or search before you ask.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Aircraft holding pattern script
« Reply #2 on: 13 Apr 2005, 10:02:36 »
Lol, yeah, I may have gone a bit overboard with the demo mission, but....  ;D

Anyway, I've found that this is a surprisingly effective way to use fixed-wing air support in a mission. Instead of having the player try to control it thru the radio menu or a map click, you can have him control it like a regular member of his squad (which is MUCH more precise). This script then lets it stand by when not in use, without flying into the ocean.

I've never felt so powerful as when I've had 3 A10s with maveric missles standing by for my word. As soon as I see a tank, its toast!  :D  8)  :o
« Last Edit: 13 Apr 2005, 10:05:55 by General Barron »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Aircraft holding pattern script
« Reply #3 on: 14 Apr 2005, 10:00:03 »
I agree with blanco; a very useful script! ;D

Although I had to try the unscripted AI for a comparison. ~11 ~11 ~11 ~11

"All, fall back into formation!"
"All, fall back into formation!"
"All! Return to formation!"
"Fall back into formation!"

It's a serious improvement on the straight AI. I'm not too agile with the designator, however, and managed to flatten myself with an lgb once ;D. But the stopping power of a few of them at your (easy) disposal is quite tremendous

Never really used planes as group members before, but this script makes it work. One minor problem is that acctime does indeed make the plane in question zoom off into the horizon. It would be nice to find a way around this; perhaps putting waypoints at 20* intervals is the problem. I've come across the situation before in the editor when I tried to get a chinook to around one point, strafing some units, by putting his waypoints in a (roughly) circular pattern. Didn't work, he got out of sync after a while, accelerated time sped up the process. Since a plane circles more naturally then a helo, perhaps just one waypoint would do the trick, provided you constantly updated it so it was off to the side of the plane? Then perhaps you'd get some more reliable circular motion.

Also, the squadnumber.sqf - haven't seen that before, very clever! I would have never thought of doing that :P

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Aircraft holding pattern script
« Reply #4 on: 14 Apr 2005, 14:57:01 »
Thanks for the reply Fragorl,

I'm not too happy with the plane zooming off into the horizon at x4 acceleration either. However, I spent a LONG time trying to get it to work on 1x acceleration. Basically, anything much larger or smaller than a 20* arc per/waypoint and the plane will sometimes turn too much or too little. Originally I had them every 45*, and it seemed to work fine at x4. But after a few revolutions, the plane would fly out of orbit, or miss a waypoint and have to turn around to catch it.

I like the idea of placing a waypoint directly to the side of the plane though. It sounds like it might just work... or else it will fail miserably! Only one way to find out I suppose. :D
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Aircraft holding pattern script
« Reply #5 on: 14 Apr 2005, 23:26:15 »
"All, go go go!" ;D

Acecombat

  • Guest
Re:Aircraft holding pattern script
« Reply #6 on: 15 Apr 2005, 05:53:51 »
Hey Gen Barron i got this demo mission of yours going to see whats up with this holding pattern script. One n00b question though , i've never been able to understand how to use the LD properly in OFP EVER  ::) :P.

I point at the targets (tanks) even bring that square up then what? How do i get the plane to drop a LGB on it? It only strafes with MG's on them whenever i tell him to attack it.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Aircraft holding pattern script
« Reply #7 on: 15 Apr 2005, 07:31:19 »
Well, it took me a while to figure out how to use the LD myself. Actually, I only figured it out like a few weeks ago :D. But it actually is fairly simple.

First off, obviously you need to select the weapon, point it at the desired target, and then press fire. A little red dot should appear, and your sights will turn into a little diamond so you know you are firing.

The LD actually creates an "enemy" which is positioned on whatever the laser is pointing at. The A10 should be able to see this target with its radar when it gets close enough. You can also try right-clicking to try and reveal the target yourself. Then you just need to select the A10, and tell it to target the Laser Target (via the #2 menu), or else click on the target to tell the A10 to attack. Basically, the laser target will act just like an enemy that you can order the plane to attack via normal controls.

The A10 should drop its LGBs when told to attack this target. A10s will NOT fire missles at the target, from what I've seen. So I'm not really sure what types of weapons can and can not be targeted in this fashion, but the Laser Guided bombs work perfect.

That isn't a very good explanation, but once you see it in action, it will make sense.

-------------

Hmm... just thinking out loud here, but I wonder if you could modify the laser target that the LD spawns. Basically, if you could change it into something that ground soldiers would fire rifles at, then you would have an easy way to direct and order 'covering fire' from your squad mates. There might be some flaws, but I'm just thinking here...
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Aircraft holding pattern script
« Reply #8 on: 15 Apr 2005, 08:37:52 »
Interesting! I know nothing about such things, but I can't see why that wouldn't work :o . Only thing is, you'd need a weapon still, or something. Perhaps, if you could modify the binocs to do something like the laser designator does, that would be an excuse to have a 'weapon' - ah, I can hear the addon makers laughing already. Never mind
« Last Edit: 15 Apr 2005, 08:38:35 by Fragorl »

Acecombat

  • Guest
Re:Aircraft holding pattern script
« Reply #9 on: 23 Apr 2005, 13:56:26 »
I still havent managed to get the A-10 to drop LGB's on targets  >:( , plus that damn diamond/red dot doesnt appear on the target when i paint them? I got as close as 250m to the targets and still no go , what am i doing wrong  :'(.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Aircraft holding pattern script
« Reply #10 on: 23 Apr 2005, 23:22:42 »
Hmm.... after you press "fire" once, the laser should be "on", and a white diamond should appear over your targeting cursor or in your optics. The red dot will appear wherever the laser is pointing, but it is hard to see at long ranges. Try pointing it straight at your feet and you should see it.

Once you are sure the thing is on, you should be able to "reveal" it to your squad by right-clicking many times on it. Or your pilot will see it on his own thru his radar, when he gets close enough. Then you just need to tell him to "target" it via the numbers menu.

I'll try to whip up a screenshot later of what it looks like.  :-\
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:Aircraft holding pattern script
« Reply #11 on: 25 Apr 2005, 11:48:00 »
Try pointing it straight at your feet

I managed to flatten myself with an lgb once

:P

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Aircraft holding pattern script
« Reply #12 on: 10 May 2005, 08:05:29 »
Script submitted to the editors depot. Topic closed.

http://www.ofpec.com/editors/resource_view.php?id=804
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!