Home   Help Search Login Register  

Author Topic: AI Airstrip  (Read 8011 times)

0 Members and 1 Guest are viewing this topic.

calm_terror

  • Guest
AI Airstrip
« on: 14 Apr 2004, 16:13:14 »
Is it possible to make a script or scripts that on an island with more then 1 runway to have the AI use both.
IE west aircraft land at one runway and east land at the other?

j-man

  • Guest
Re:AI Airstrip
« Reply #1 on: 14 Apr 2004, 20:59:29 »
I think you can have only one working runway on an island.

This might work:

Code: [Select]
planename land "LAND"
I doubt it'll work. But worth a try anyway

calm_terror

  • Guest
Re:AI Airstrip
« Reply #2 on: 14 Apr 2004, 23:43:55 »
yeah i know but i mean make a script that sets an airport to one side and another to the other side.
that land command will only have the plane land at the main hard coded airport..

Sniper_Kyle

  • Guest
Re:AI Airstrip
« Reply #3 on: 20 Apr 2004, 01:25:36 »
That would take a lot of scripting/coding my friend, a lot....i dont know if ill even touch upon this one.... :-\


Cheers,
     Sniper_Kyle ;D

Offline KTottE

  • Former Staff
  • ****
Re:AI Airstrip
« Reply #4 on: 20 Apr 2004, 09:23:52 »
Given that you can only configure one AI airstrip in the config this is impossible.

Code: [Select]
plane land "LAND"

Will simply make the airplane go and land at the configured AI Airstrip.

The only work-around as I see it is if you use some sort of setPos-script which gradually brings the plane down to land at an airport, but setPos scripts work so - so in multiplayer. (Looping setPos'es that is)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:AI Airstrip
« Reply #5 on: 20 Apr 2004, 09:40:53 »
Well, there's one thing you could do:

- If it's only for AI

- If the player(s) has(have) nothing to do with the airport
.means: if the player(s) will never see the airport during that
mission while the ai is landing and taking off there

Then you could make a neutral airport by using setcaptive
techniques.

Both sides (ai) would then use the one airstrip for take off and
landing, and then you can still setpos one side's planes to the
other airport.

:again - this makes only sense in case of the situations i mentioned above.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

calm_terror

  • Guest
Re:AI Airstrip
« Reply #6 on: 20 Apr 2004, 16:08:45 »
no i want 2 seprate airbases..
and I don't care aboot MP.. but set position will not work if the plane has to take off again.. plus what aboot landing gear and all that?

DBR_ONIX

  • Guest
Re:AI Airstrip
« Reply #7 on: 20 Apr 2004, 17:21:37 »
You can use the action command to lower the wheels, use  :
Code: [Select]
pilotname = planename driverto get the pilot's name, then use
Code: [Select]
pilotsname action ["lower gear"]

I think thats the right code, you'll need to have a look at the command ref. to check the commands (There is deff. a command to get the pilot, or gunner or cargo's name, I am 100% sure)

Anyways, good luck with the stuff :)

What are you using this for, maybe if you give more info, people can be more definite in there help :)
- Ben

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:AI Airstrip
« Reply #8 on: 20 Apr 2004, 17:49:15 »
What i meant about using only one airstrip for take off and
land doesn't mean that you cannot have two seperate
airbases. Only thing is (and this is fact) - AI can only use
the one and only defined airstrip for take off and land.

After successful landing, that's the point, where you would
do setpos everything from one side to the other airbase.

As already been mentioned before, if you want to simulate
take off and landing from another airstrip, it would require
a lot of tricky scripting to get it to work - i wouldn't want to
mess around with it, as i'm sure i would loose all the hairs
on my head to get this to work. And be sure, i've been doing
alot of stuff yet in ofp.

It can be done, but would it be worth all the effort (*loves
his hairs like it is actually ;D *).

Don't forget that you cannot really control ofp's ai perfectly,
because these guys sometimes start doing weird things,
even if everything worked perfectly the last time, before
you reopened the mission.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Unnamed

  • Guest
Re:AI Airstrip
« Reply #9 on: 21 Apr 2004, 23:02:20 »
I'm willing to work on this (my hair is already falling out :o  :)) as it fits in with an idea I had for active addons (Buildings e.t.c  packed full of scripts) that can be dropped into a mission ready to use with the minimum amount of user intervention.

Although getting the AI to fly the plane while landing\taking off could be a real pain. I have routines to generate spline curves in OFP, so you could setvelocity the planes when taking off and landing. This might look a bit strange, so it depends if this would be acceptable?

Plus the AI wont land on them unless you give it specific commands to, like:

Code: [Select]
[This,MyAirbase01]  Call AB_Land

[This,MyAirbase01]  Call AB_TakeOff


But you could add loads of eye & ear candy like:

Guys to shuttle planes into hangers
Control tower radio chatter
Fire control teams
Repair and refueling vehicles
Runways that could be attacked and disabled.
e.t.c.....

calm_terror

  • Guest
Re:AI Airstrip
« Reply #10 on: 21 Apr 2004, 23:58:39 »
cool sounds promising

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #11 on: 23 Apr 2004, 11:15:27 »
Greets,

Sounds like an excellent idea, Unnamed, very useful for controling AI aircraft generally (and maybe a way to get them to perform carrier landings?)

Looking forward to seeing this.

Sorry to hear about your hair... :P

-Supr. Cmdr. PsyWarrior

Commando

  • Guest
Re:AI Airstrip
« Reply #12 on: 25 Apr 2004, 03:24:55 »
whats the status? Anyone still doing any thing about this?
This would be a big revolution for ofp especially if it would be good or just Ok for mp too  ;D because i think more and more people are getting in to mp gaming these days.
I would like to be able to make a GTA kind o mission where i could have a.i civilians flying planes betwen 2 or more different airports and that would be very useful on addon islands that has more than 1 island and or airport.

I can just imagine when you hurry with your car to catch a plane at the airport and try getting away from your 2 friends that are driving some cars behind you or are on their way to the airport too to stop you and you get in the plane and take off and flee to another side of the island or another island  :)

carrier landings are also very intresting, and it would be very cool if you could have military bases that could ship men and ammo, weapons from a small island airport / base to the main island airport where there's fighitng going on.
That would be a awesome atmosphere to see and hear planes take off and unload soldiers or maybe vehilces to w scripting and then take off again constantly , it would be a realistic and alive airport then  8)

Unnamed

  • Guest
Re:AI Airstrip
« Reply #13 on: 25 Apr 2004, 17:48:51 »
I had a mess around with the idea, I can get the BIS Sopwith to take off reasonable well. Jets don't work quite as well, their engines don't increase revs when you use SetVelocity.

But the main problem is the AI insists on taxing south as soon as you put it in a plane, on the runway. This is a real pain and I don't know how to stop it, short of removing all the fuel, which is not what I wanted.

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #14 on: 25 Apr 2004, 18:14:53 »
Hmm.

BIS were obviously only thinking of the 1985 campaign when they created their fixed-wing plane AI... ::)

This is so basic it's probably going to insult you but: have you tried the "stop" command? it works on somethings, but not others.

Or you could set an eventHandler to check if the engine is on, and turn it off.

Or you could remove all the fuel... ::) ;D
Actually, it wouldn't matter too much, as long as the plane was an AI who was not in the player's group (otherwise he would report 'out of fuel'). And as long as there are no fuel trucks on the map (or he would call 'need fuel!').

Or you could shoot the pilot every time he moves and hope that the AI eventually develops an aversion to automatically taxing south... ;D

OK, I'll shut up now...

Does this only happen if you put it on the main runway? what happens if you put it on the second runway on Malden/ Nogova? Or on a flat part of Kolgujev?

What about placing it on the top of a carrier?

If it only happens on the main runway, it doesn't matter as the planes can take off from there without our help...

Quote
their engines don't increase revs when you use SetVelocity.
Noticed that. Look at the carrier takeoff script for the HMS Hermes BETA - it has the same problem. I think we can live with it.

What about landing? That's going to be the difficult part.

-Psy|W