Home   Help Search Login Register  

Author Topic: AI Airstrip  (Read 7999 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

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:AI Airstrip
« Reply #15 on: 25 Apr 2004, 20:33:07 »
Just a thought, but could you not disable the AI 'move'.

It would mean that you would have to control their every move, instead of letting them do it.


Planck
I know a little about a lot, and a lot about a little.

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #16 on: 25 Apr 2004, 21:45:33 »
Quote
Just a thought, but could you not disable the AI 'move'

Aaaaaaaaagh!
*thinks of 2000+ page script to control a plane in the air with dogfighting, etc.*

If you did that, Planck, the AI would be completely incapable of doing anything once they got into the air! Unnamed would launch them, and as soon as the script cut out, the plane would plummet right out of the sky as the AI has not idea how to move or anything.

It would be possible to do that for planes on the ground, but as there's no way of re-enabling the AI after launch, it sort of makes the command more trouble than it's worth.

-Psy|W

Unnamed

  • Guest
Re:AI Airstrip
« Reply #17 on: 25 Apr 2004, 21:45:39 »
Quote
This is so basic it's probably going to insult you but: have you tried the "stop" command?

You would think that would work, but no. The AI ignores every order you give it, while trying to take off :(

Quote
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?

I think the AI is programmed to try and take off ASAP, so it will do it anywhere including the desert island.

Quote
What about placing it on the top of a carrier?

I will have to download a carrier (any suggestions on the best one to try?) But it would probably just drive off the side, left to its own devices :)

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

Yeah I see it as two parts, the first getting it to a spot say 1000m away and 500m high, facing the runway, so we can take control of it. The second, getting it to touch down at a sensible speed without bashing itself to bits. I need to create some graphs based on how BIS do it, then just try and copy it.

Quote
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.

At a push you could use the say command and a generic sample for take off.

Quote
Just a thought, but could you not disable the AI 'move'.

I hate doing this if I plan on using the guy in game. But kind of on the same lines, cam creating a temporary pilot (with no AI) for take off and landing should work. Although you have to mess around swapping them, when they get in and out or there about to land.

Cheers
« Last Edit: 25 Apr 2004, 21:51:48 by Unnamed »

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #18 on: 25 Apr 2004, 21:57:39 »
Quote
I will have to download a carrier (any suggestions on the best one to try?) But it would probably just drive off the side, left to its own devices
How about the HMS Hermes BETA (I believe it is from the Falklands mod people). It's only a BETA release, but it should suit your needs. And you will be able to see what I was talking about with the carrier top launch scripts.

Actually, I think it won't drive off the side - it will just sit there...refusing to move at all (as most units will when placed on a structure over water). Or maybe it will just drive off the side. ;D

Quote
Yeah I see it as two parts, the first getting it to a spot say 1000m away and 500m high, facing the runway, so we can take control of it. The second, getting it to touch down at a sensible speed without bashing itself to bits. I need to create some graphs based on how BIS do it, then just try and copy it.
*Shudder* :noo:

Quote
cam creating a temporary pilot (with no AI) for take off and landing should work. Although you have to mess around swapping them, when they get in and out or there about to land.
Now that's a good idea... It should be workable too. You could setpos the original pilot somewhere where he won't be seen (10,000 M up in the air, perhaps?), and use createUnit (and then remove the movement AI), or camCreate (to create a pilot with no AI at all). So the disableAI command could be useful, in the end... ::)

-Psy|W

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:AI Airstrip
« Reply #19 on: 25 Apr 2004, 22:08:30 »
Well, I didn't actually expect the disabled Ai to fly the plane, I naturally assumed you would give it a proper pilot at the appropriate time.

It's a workaround anyway.


Planck
I know a little about a lot, and a lot about a little.

Black and White

  • Guest
Re:AI Airstrip
« Reply #20 on: 26 Apr 2004, 05:53:38 »
hey a quick comment:

if you disable the AI for a particular unit... ie: AI movement
well can't you always just enable it again...?

never tried it, buts that what i just thought...
so mayhaps you can disable his AI for takeoff and re-enable it for flight...

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #21 on: 26 Apr 2004, 11:50:25 »
@Planck - sorry, misunderstanding. Of course, it would be impossible to simply disable the AI of a unit altogether and expect it to fly, but it would certainly be possible to replace the real pilot with one without the "Move" AI.
[EDIT: Made no sense. Corrected]

It may be the best workaround there is - After all, many things in OFP are workaronds - The CoC torpedoes and Project MCAR, for instance...

@Black and White: BIS seem to have missed out the enableAI command... Which means that using disableAI on a unit will permanently remove the specified section of it's AI.
It cannot, to the best of my knowledge, be re-enabled.

Progress, Unnamed? Is swapping the real pilot out with a 'stupid' pilot a viable option?

If so, the 'stupid' AI could be brought in as soon as the plane is at a dead stop (when landing). However: another complication: If you wanted the pilot to jump out and move somewhere on foot (barracks, ready room, medical facilities, ATC tower etc.), you would have to swap the AI's again when you want the pilot to disembark!

How can obvious AI changing be avoided if the player is watching? You could use setFace to get the features the same, but I don't think there's a getFace command (correct me if I'm wrong) that could be used to tell which face the pilot has. Matters would also be complicated if the pilot is not wearing the 'standard' BIS pilot uniform.

In another matter: Will the takeoff/ landing scripts work with all planes? I have noticed that the takeoff/ landing system on the HMS Hermes will work with most planes, but will not work with the Sea Harrier (another Flashpoint in the Falklands vehicle).

-Psy|W

P.S. - did some more research - HMS Hermes carrier and sea harrier are available Here.

[EDIT 3:] Corrected horrific grammer and random comma placement.
« Last Edit: 26 Apr 2004, 18:15:00 by PsyWarrior »

Unnamed

  • Guest
Re:AI Airstrip
« Reply #22 on: 26 Apr 2004, 23:01:09 »
Quote
Progress, Unnamed? Is swapping the real pilot out with a 'stupid' pilot a viable option?

I did some more messing with AI in planes, to try and work out whats going on.

If you put anything as a pilot into a plane with fuel, placed on the ground. It will try and take off. If its a gamelogic, it will get so far then realizes it cant fly and stop dead.

One way to stop this is the SetFuel command. If you use SetFuel 0 in the vehicles init event, you get a few seconds after the AI has moved in, to setFuel 1. This way he will not report missing fuel and he wont start the engine until you give him an action command. So sorry for dismissing Setfuel before, without giving it a better go.

I had a go at getting the AI to land, not very elegant but it survives :) You have to cut the engine before touchdown, otherwise the AI tries to take off again.

You can use FlyInHeight and Setvelocity to get it down to 20 meters at a reasonable speed. After that you have to fight against the 20 meter altitude limit OFP puts on aircraft travelling at a certain speed.

The other is landing gear, I can't get the AI to lower the landing gear. The Action ["land gear"] only works with the player or empty planes. I think you might be able to lower them using animations, but that would require most addons to be changed :(

Quote
If so, the 'stupid' AI could be brought in as soon as the plane is at a dead stop (when landing). However: another complication: If you wanted the pilot to jump out and move somewhere on foot (barracks, ready room, medical facilities, ATC tower etc.), you would have to swap the AI's again when you want the pilot to disembark!

You have to have someone in there, otherwise the plane veers off course. At worst it would be a Game Logic that looks like a pilot, but I think you could keep the original pilot without disabling his AI.

Quote
In another matter: Will the takeoff/ landing scripts work with all planes? I have noticed that the takeoff/ landing system on the HMS Hermes will work with most planes, but will not work with the Sea Harrier (another Flashpoint in the Falklands vehicle)

I had a look at the Hermes, I liked the way they setup its direction in the example mission to exploit the AI's desire to take off straight away.

If you don't define an airport in the config, the AI heads straight for position [0,0,0]. If it can get enough speed up it will take off, so you could make sure the airstrip is pointing towards the position defined in the config, then the AI will quite happily take off all day. You might need the aircrafts top speed if you want to handle taking off using scripts, but not for landing.

I tried the above with the Sopwith, C17 and a Tornado.

The landing gear is the main problem, short of animating it into position I don't know how to land the planes. I will take a look for an Airstrip addon, something that you can just place in the editor and will allow the planes to reach there take off speed.

Cheers

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #23 on: 27 Apr 2004, 09:34:43 »
Quote
If you put anything as a pilot into a plane with fuel, placed on the ground. It will try and take off. If its a gamelogic, it will get so far then realizes it cant fly and stop dead.
??? ::)
A gamelogic tries to take off, and OFP has to think before it realises it's not alive?
Read above comments about BIS plane AI...

Quote
One way to stop this is the SetFuel command.
Good! I didn't know that you had to issue the AI a command to get it to recover from a lack of fuel. Does this stop it heading for 0,0,0 or taxing south altogether?

The ["Land Gear"] action probably does work - but the instant the gear starts to deploy, the pilot pulls it back up again.
If you animated a set of 'gear' down, wouldn't OFP just regard it as another bit of the plane that was sticking out, not actually landing gear? So if you tried to land on them, it would just explode, as if you had clipped the wing on the ground. When the 'gear down' action is selected, does it just perform an animation, or does it do some kind of technical...stuff...that tells OFP not to simply blow the plane up when it touches the ground?
I hope someone understands the above enough to comprehend what I'm going on about ::)

There is one plane addon that can land without gear (i.e. crash landing). I believe it's the F/A 18. Unfortunately, none of the other planes can do it, so that isn't really helpful.

I'm sorry I can't be more help with this at the moment... There must be some way to get the AI to lower his gear!

Moving on:
How far away/ what height does the plane have to be at to begin landing?

Quote
I tried the above with the Sopwith, C17 and a Tornado.
Good variety. Which tornado? the ITA and the RAF version are quite different.

Here's another idea for you: while you are testing, instead of looking for/ creating an airstrip, you could
-Use the taxiway sections from an editorUpgrade to create a fairly long runway
-Sink the Hermes carrier into the ground, using setPos commands, so that the 'Boat' part is not visable, and the runway and tower are level with the ground. You could use the length of the carrier then, as a runway.

-Psy|W

Unnamed

  • Guest
Re:AI Airstrip
« Reply #24 on: 28 Apr 2004, 16:17:32 »
Quote
A gamelogic tries to take off, and OFP has to think before it realises it's not alive?

Hmm I dont know why this happend, I cant get it to do the same again. Might have been some stray code I had kicking about  ???

Quote
Good! I didn't know that you had to issue the AI a command to get it to recover from a lack of fuel.

Me neither, I read about it over at the "Time For Action" thread.

Quote
Does this stop it heading for 0,0,0 or taxing south altogether?

But aircraft only work that way on Islands that have no taxi way defined (Desert Island), otherwise they startup as soon as the fuel is in the plane.

Quote
If you animated a set of 'gear' down, wouldn't OFP just regard it as another bit of the plane that was sticking out, not actually landing gear?

Yep apparently it has to be selected from the action menu, and that option is defined in the config. I dont think you can include the Land Contact Points in a regular animation, I think they are just linked to the Landing gear.

Quote
When the 'gear down' action is selected, does it just perform an animation, or does it do some kind of technical...stuff...that tells OFP not to simply blow the plane up when it touches the ground?

Both, as above.

I tried a C130 that already had animations defined for the gears. What you can do, is set retractgear=false in a config, so the landing gear is down all the time for the AI. Then use animations to retract\extract the landing gear geometry, so you can at least fool someone watching the AI land and take off. You could add a script to destroy AI planes if they touch the ground without the gears displayed.

But this means creating your own tiny addons to inherit from each type of aircraft you want to include.

Quote
How far away/ what height does the plane have to be at to begin landing?

OFP approaches from about 100 meters high, I'm not sure about the distance, but it takes it's time. It will depend on the speed of the plane during level flight, and how quickly you want to slow it down, what might be in the way e.t.c

I'm using the ITA Tornado, just to see how the speeds pan out across different types. Getting all types to land is easy, when you fix the landing gear down. Making it accurate enough for small runways like the Hermes will be the hardest part.

Quote
Use the taxiway sections from an editorUpgrade to create a fairly long runway

The Taxi Way will do fine for now, thanks. Although it's quite a narrow target to hit  :o

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #25 on: 29 Apr 2004, 11:47:06 »
Quote
But this means creating your own tiny addons to inherit from each type of aircraft you want to include.
Awwww whaaat?! I don't want to create a new addon for every single OFP plane... I doubt you will either, since you'd have to mod every new plane that was released!
As a mission editor, I really don't want to have a list with
Unnamed's slightly modified A10
Unnamed's slightly modified F/A 18c Blue AT
...
Unnamed's slightly modified F/A 18d grey AA
...
Unnamed's slightly modified RAF Tornado AA

and so on...

There must be another way around this.

Quote
Hmm I dont know why this happend, I cant get it to do the same again. Might have been some stray code I had kicking about  
So we could use a gamelogic pilot to stop movement?

Quote
Yep apparently it has to be selected from the action menu, and that option is defined in the config.
How annoying. Accursed BIS' AI.

So: If you empty the plane, you can put the gear down, but the plane veers off to the side and plummets to the ground. If you keep the pilot in the plane, you can't put the gear down. What happens if you swap the pilot out for a gamelogic? What about removing the pilot, issuing the 'Gear Down' command, and then put the pilot back in? What about using a loop to re-issue the 'gear down' command every 0.01s?

I'm going to find some workaround for this if it kills me... >:( ::)

Quote
Although it's quite a narrow target to hit
Just wait till we start placing carrier length runways at random angles... ;D

-Psy|W

Unnamed

  • Guest
Re:AI Airstrip
« Reply #26 on: 30 Apr 2004, 13:20:09 »
Quote
Awwww whaaat?! I don't want to create a new addon for every single OFP plane... I doubt you will either, since you'd have to mod every new plane that was released!

It would be a pain I know, although it would not bother me so much, but I would only do it for planes I wanted to use myself. You would have to organise them in the editor, it's only a tiny config rather than the entire addon. But a script based solution would be ideal.

If there compatable with Sefe's landing gears (Just spotted this) http://www.ofpec.com/editors/resource_view.php?id=81 The additional config will only contain a couple of lines.

Quote
There must be another way around this.

This is the only thing thats preventing it from being a viable option ATM.

Quote
So we could use a gamelogic pilot to stop movement?

No, but I need to mess round with SetFuel more.

Quote
How annoying. Accursed BIS' AI.

Yeah, it has a knack of throwing a spanner into the works. But thats probably down to the imensity of what BIS are trying to do.

Quote
What happens if you swap the pilot out for a gamelogic? What about removing the pilot, issuing the 'Gear Down' command, and then put the pilot back in? What about using a loop to re-issue the 'gear down' command every 0.01s?

It might work, if you get the timing right. The action command for landing gear does work with AI, but only when its on the ground ::)

Quote
I'm going to find some workaround for this if it kills me...

Lol..I know what you mean.

Quote
Just wait till we start placing carrier length runways at random angles

Yeah, if it can land on that Taxi way, Carrier's should be easy. It would be nice to get to the point where you can set a crash probability, just to spice things up :)

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #27 on: 30 Apr 2004, 20:34:22 »
Quote
The action command for landing gear does work with AI, but only when its on the ground
ROFL!
Oh, Right, so if you're in the air and you hit the gear, nothing happens, and you have to eject. If you're on the ground and you hit the gear, they go up, and you total your multi-million pound/ dollar/ euro fighter.
Makes sense. ::)

Quote
It would be nice to get to the point where you can set a crash probability, just to spice things up
LOL...
Reminds me of a HALO script I did (I think everyone creates a HALO script at some point during their scripting 'career'). It had a built in Chute-faliure-and-plummeting-to-death 'feature' ( ::) ), and a 50% chance of being saved by a secondary chute.
Unfortunately, I set the defaults a little high - out of 3 squads, about 6 people were killed each time... ;D

Hence, the randomCrash factor should be able to be set by the mission designer.

But, yes, a very small chance of crash would be a nice (in a way) feature, especially if the system is to be used in RTS mods. It would add a touch of realism to a genre that is often associated with unrealism.

I haven't come up with any other gear ideas yet... Have a play with the other stuff, and see if there's any possiblity in them. If not, we'll just have to keep thinking...

...or modify all the addons :noo:

-Psy|W
« Last Edit: 30 Apr 2004, 20:35:17 by PsyWarrior »

Unnamed

  • Guest
Re:AI Airstrip
« Reply #28 on: 03 May 2004, 09:33:58 »
Quote
HALO scripts

Lol..Some of the funniest moments online where with Halo scripts  ;D

Quote
I haven't come up with any other gear ideas yet... Have a play with the other stuff, and see if there's any possiblity in them. If not, we'll just have to keep thinking...

I still think addons are the way to go, it makes life so much simpler. After they land it would be ideal if you could see them taxi into hangers e.t.c With the AI fighting you all the way, this would be almost impossible using regular planes. Im messing around with a version of the Sopwith defined as a car, to see how that works.

I managed to get an AI plane to stay put on the ground, just used a quick loop that keeps seting the fuel from 0 to 1. It makes the AI's engine tick over at very low revs, without complaing about the fuel level.



PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #29 on: 04 May 2004, 10:00:53 »
Quote
Lol..Some of the funniest moments online where with Halo scripts  
Bet they didn't have 'Random-sending-half-the-players-to-their-doom' though... ::)

Quote
I still think addons are the way to go, it makes life so much simpler.
Hmm... :-\
You may be right. If so, addon makers will have to be contacted, CPPs will need to be rewritten, addons organised,
Ignore=true; goto "New Info"
gear redesigned, and 50MB of stuff to download (Instead of just scripts and a demo mission). It's a lot of work to take on.

OK. If we did do this through addons, how much space would the addons take up? If they are roughly the same size as the existing addons, we're looking at a large download.

Basic question: Is it possible to use the textures and model in another addon? If so, our PBOs would only need the new CPP/ scripts, not all the model, textures and scripts that come with the full version of the addon.


#NEW INFO
Quote
I would only do it for planes I wanted to use myself. You would have to organise them in the editor, it's only a tiny config rather than the entire addon.
Verdammt, just noticed the above. Ignore the stuff I have written.
If you were going for a full release, you'd need to do this for as many planes as you could get permission to do so for. Or at least, all the most popular planes, anyway.

Quote
I managed to get an AI plane to stay put on the ground, just used a quick loop that keeps seting the fuel from 0 to 1.
Good. How is the AI going to be moved around on the ground? A setPos/ setDir loop? May look a little strange, though.

-Psy|W
« Last Edit: 04 May 2004, 10:03:53 by PsyWarrior »

Unnamed

  • Guest
Re:AI Airstrip
« Reply #30 on: 04 May 2004, 20:25:35 »
Quote
Bet they didn't have 'Random-sending-half-the-players-to-their-doom' though...

They managed to get 50% failure on there own  ;D

Quote
If you were going for a full release, you'd need to do this for as many planes as you could get permission to do so for.

I just knocked this up, but I dont see it being that much larger:

Code: [Select]
class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Air: AllVehicles {};
   class Plane: Air {};
   class A10: Plane {};
   class AI_A10: A10
   {
   animated=1;
   displayName="AI A10";
   gearRetracting = false;

        class Animations
      {
         class DoorsAnim1
         {
            type="rotation";
            animPeriod=1;
            selection="dvere1";
            axis="osa_dvere1";
            angle0=0;
            angle1=-0.55;
         };

         class DoorsAnim2
         {
            type="rotation";
            animPeriod=1;
            selection="dvere2";
            axis="osa_dvere2";
            angle0=0;
            angle1=-0.30;
         };

   Â Â Â Â Â Â Â Â Â class LeftGear
         Â Â Â Â Â Â {
           Â Â Â Â Â Â  type="rotation";
           Â Â Â Â Â Â  animPeriod=1;
           Â Â Â Â Â Â  selection="left gear";
           Â Â Â Â Â Â  axis="axis left gear";
                  angle0=0
                  angle1=.20;
               };

              class RightGear
               {
                Â Â Â type="rotation";
                    animPeriod=1;
           Â Â Â Â Â Â Â Â Â selection="right gear";
           Â Â Â Â Â Â     axis="axis right gear";
                    angle0=0
                  Â Â Â angle1=-.20;
       Â Â Â Â Â Â Â Â Â  };

       Â Â Â Â Â Â Â Â Â class NoseGear
       Â Â Â Â Â Â Â Â Â  {
         Â Â Â Â Â Â       type="rotation";
         Â Â Â Â Â Â       animPeriod=1;
         Â Â Â Â Â Â       selection="nose gear";
         Â Â Â Â Â Â       axis="axis nose gear";
         Â Â Â Â Â Â   Â Â Â angle0=0
         Â Â Â Â Â Â   Â Â Â angle1=2.2;
       Â Â Â Â Â Â      };

           class LeftGearCover
         Â Â Â Â Â Â {
           Â Â Â Â Â Â  type="rotation";
           Â Â Â Â Â Â  animPeriod=1;
           Â Â Â Â Â Â  selection="left cover";
           Â Â Â Â Â Â  axis="axis left cover";
                  angle0=0
                  angle1=-1.55;
               };

              class RightGearCover
               {
                Â Â Â type="rotation";
                    animPeriod=1;
           Â Â Â Â Â Â Â Â Â selection="right cover";
           Â Â Â Â Â Â     axis="axis right cover";
                    angle0=0
                  Â Â Â angle1=1.55;
       Â Â Â Â Â Â Â Â Â  };
      };
   };

Not that it would not ask, but as I planned on just inheriting from a class, and not changing anything from the original addon. I did not think I had to ask permission, as it would not be the addon I released, but something that supports an addon?

Quote
Good. How is the AI going to be moved around on the ground? A setPos/ setDir loop? May look a little strange, though.

SetPos and SetDIr all set a vehicles pitch to 0, so for the likes of the Sopwith it makes it dip over and over again. Ground crew towing it would be the best way, at worst it will taxi straight into a hanger then get teleported to a more permanent hanger out of the way of the next landing.

I'll send you an IM.
« Last Edit: 04 May 2004, 21:30:20 by Unnamed »

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #31 on: 06 May 2004, 15:28:03 »
Quote
I just knocked this up, but I dont see it being that much larger:
That is smaller than I expected.

Quote
They managed to get 50% failure on there own
HALO script + High Ping = Death...

Quote
Not that it would not ask, but as I planned on just inheriting from a class, and not changing anything from the original addon. I did not think I had to ask permission, as it would not be the addon I released, but something that supports an addon?
Yes, I see. Since there's no modification involved, I don't see any problem.

Quote
SetPos and SetDIr all set a vehicles pitch to 0
Ah, yes, I remember that now. Oh well.

-Psy|W

Commando

  • Guest
Re:AI Airstrip
« Reply #32 on: 13 May 2004, 11:36:44 »
the falklands Hermes carrier is to small and to hard to land on, there is a pretty new or old at this time depening on who from who's view you look at it..

here is a link to download it. http://members.iinet.net.au/~nrspence/hwk_uss_nimitz_05.rar

and here is some pictures links

http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=7c81adb174479ac84fbcf36b599bb667;act=ST;f=33;t=36592;st=2430

Unnamed

  • Guest
Re:AI Airstrip
« Reply #33 on: 13 May 2004, 11:58:16 »
Yeah I thought it was small myself, but I went for it because it was made in my home town. I would have prefered the Invincible, as I got a day off school to watch its launch :)

P.S Could not see a screen shot, but Ive downloaded it anyway.

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #34 on: 13 May 2004, 11:59:20 »

I can land on the Hermes... It took a little practice, but I can do it with the A10, F/A 18 and Tornado. It is possible, but requires some practice, and a slight modification to the breaking triggers to make them sensitive enough to actually stop you...

Hitting the carrier shouldn't be that much of a problem. We need to hit targets of about that size anyway, If we are going to see any real deployment of the system in an RTS environment (can't have the player building massive long 2KM long runways across the map).

Of course, when I say "Shouldn't be that much of a problem", I'm speaking relatively... ;D

I actually downloaded the Nimitz recently, but haven't got around to installing it yet. I'll take a look at it later.

-Psy|W

Commando

  • Guest
Re:AI Airstrip
« Reply #35 on: 13 May 2004, 17:14:03 »
try the nimitz it is much more well done with textures and it has built in scripts like bas choppers for an example  :D so when you get close enough to carrier it comes up a line in action menu saying land with line break and you choose it and then you slow down and lower the plane down and touch down! It stops the plane the instant you hit the ground.
Textures are top work and model too. it has 4 working catapults to btw
and the whole thing can be placed out preasembled either in groups west or in empty HAWK -vehicles - Nimitz.

it has a radar that spins around automatically all the time and hmm it works in MP to with all scripts  8) its much larger than the Hermes i know i said that one before but i really want you to use this carrier instead because i think it may even be easier for a.i's to land on it because of built in scripts and or the size of it. only negative thing is that you can't drive the carrier or get in as commander in a control or radar tower so you could view radar and move the ship but hey you can't have everything i guess. I have made many fine missions with nimitz carrier and the hudson & pennywise F-18.  ;D

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #36 on: 13 May 2004, 17:24:25 »
Quote
it is much more well done with textures
Nimitz == "FINAL"
Hermes == "BETA"
 ;)

But yeah, I'll have to install that when I get home.

Anyway, the script will probably work both with the Nimitz and the Hermes. And other plane-landing-on-things... ::)

-Psy|W

Commando

  • Guest
Re:AI Airstrip
« Reply #37 on: 13 May 2004, 19:20:47 »
okay sounds like a good script!  8)
Me is getting intrested in this little project here  ;D

Unnamed

  • Guest
Re:AI Airstrip
« Reply #38 on: 13 May 2004, 19:53:50 »
I do like the Nimitz, although to be fair to the Falklands mod team there stuff is still beta. But Hawk has certainly set the standard.

Quote
you can't drive the carrier or get in as commander

If you can man the working Vulcan turrets in MP. I'm sure we could rig something using the Game Logic system developed for Psychic Production's MCar, to steer it. Although thats probably a project for further down the line.

PsyWarrior is correct, if we can make it work for the Hermes then the Nimitz will be a doddle :)

PsyWarrior

  • Guest
Re:AI Airstrip
« Reply #39 on: 13 May 2004, 21:10:12 »
Both Unnamed and I have other immediate priorities right now (one of which is project MCAR), and it is possible that this system will only see deployment in a joint RTS mod, rather than as a standalone system (due to the difficulty of writing a new CPP for every supported aircraft).

EDIT: Ignore the above. Unnamed now has the ability to resume work on this system.

But you'll see it in some form or another eventually... ;)

-Psy|W
EDIT: K'Pekt! Unnamed beat me to it...
« Last Edit: 08 Jul 2004, 14:37:09 by PsyWarrior »

Unnamed

  • Guest
Re:AI Airstrip
« Reply #40 on: 22 Jun 2004, 08:31:24 »
Just a quick update, I'm still working on it :)



An AI F18 landing on the Nimitz. The eagle eyed amongst you might just notice an AI C130 landing on the Nogova North runway as well.
« Last Edit: 16 Aug 2004, 16:10:34 by Unnamed »

Commando

  • Guest
Re:AI Airstrip
« Reply #41 on: 22 Jun 2004, 12:06:46 »
 :o ;D :D :) awesome work! How did you people got the a.i to land on both aircraft carrier and the northern airfield. i can't wait untill i get my hands on this i can draw the scenario when me and some friends are playing coop over the Lan or  internet and we have c130's transporting the woundead from the battlefield to the airbase islands hospital and then going back and forth like a bus traffic  :D  this is the best news of the day!!!  ;D

Unnamed

  • Guest
Re:AI Airstrip
« Reply #42 on: 22 Jun 2004, 23:05:59 »
Quote
How did you people got the a.i to land on both aircraft carrier and the northern airfield.

It was easier than I thought to land the AI, there is a bit or work involved making it into a useable system. But I dont know why OFP never supported more than one runway, probably a last minute thing.

Quote
i get my hands on this i can draw the scenario when me and some friends are playing coop over the Lan or internet and we have c130's transporting the woundead from the battlefield to the airbase islands hospital and then going back and forth like a bus traffic    this is the best news of the day!!!

When I'm closer to releasing a Beta, it would be great if you would be interested in doing some missions? Although it is going to have to rely on addons, for most aircraft.

I know what I want form the system, but I have a specific type of mission in mind. I would like to add extra features if there gonna be usefull to others.

Cheers
Quote
« Last Edit: 01 Jul 2004, 12:32:08 by Unnamed »

JLC

  • Guest
Re:AI Airstrip
« Reply #43 on: 28 Jun 2004, 18:33:19 »
Somebody has idea of as being able to take a look to the scripts of BIS that carry out the action of the landing. It would be interesting to see how they have made it and what treatment they give him. Could also give us to us an idea of how to modify this so that all the airplanes can land without having to modify them. Personally I think that it is easier to generate a patch for a single thing that for many.  In all ways I think that what you have made this very well and I am crazy to see it in action.

Unnamed

  • Guest
Re:AI Airstrip
« Reply #44 on: 29 Jun 2004, 03:36:09 »
Quote
Could also give us to us an idea of how to modify this so that all the airplanes can land without having to modify them.

Only those that do not need to lower there landing gear will work without an addon. The Sopwith and the Cessna for example.

Quote
Could also give us to us an idea of how to modify this so that all the airplanes can land without having to modify them.

I dont think you can. Perhaps if it works ok, addon makers will include the required functions in there addon. Then there would be no additional files needed.

But I cant see this being used for that many missions, there are only certain types that need more than one working runway.

Cheers


JLC

  • Guest
Re:AI Airstrip
« Reply #45 on: 01 Jul 2004, 05:53:18 »
Quote
I dont think you can.

I have not said in any moment that I am the one that can make it. The only thing that I say is that it would be interesting to be able to see how it is that BIS makes this. I have been trying with the command setvelocity. And I have seen myself that, after it applies to an airplane the AI returns to their previous speed. There are other commands with those that the same thing happens, and that is something that you have discussed here. I repeat that, if a look could be taken to the autopilot scripts of BIS. One could see how it is that they achieve these things.  


Quote
addon makers will include the required functions in there addon. Then there would be no additional files needed.


I believe that you have not understood the idea, what I am outlining is to modify in some way the original scripts so that they work like it should be.

Unnamed

  • Guest
Re:AI Airstrip
« Reply #46 on: 01 Jul 2004, 12:16:51 »
Quote
I believe that you have not understood the idea, what I am outlining is to modify in some way the original scripts so that they work like it should be.

I dont think there are any original scripts available, it is all contained in the executable.

For setvelocity, you need to call it in a loop:

Code: [Select]
#Loop

_Plane SetVelocity [2,2,0]

~0.1
goto "Loop"
« Last Edit: 01 Jul 2004, 12:17:06 by Unnamed »

JLC

  • Guest
Re:AI Airstrip
« Reply #47 on: 03 Jul 2004, 00:48:50 »
Quote
I dont think there are any original scripts available, it is all contained in the executable.

You don't have idea of as it hurts me to hear this news. I had my secret hopes to take a look to these scripts.  

Quote
For setvelocity, you need to call it in a loop:
 
If this is what I am making, but I don't like it. The commands stop true and disableai "move" they don't work me like they would should

Commando

  • Guest
Re:AI Airstrip
« Reply #48 on: 09 Jul 2004, 01:52:57 »
You guys know that there's a version 0.6 released by [APS] Gnat on the official forums under addons & mods complete section?  ;D
it says they made all 4 catapults usable and some other stuff.
Could be something worth to check out  ;)