Home   Help Search Login Register  

Author Topic: Aircraft pitch solution found! u can make AI barrel roll now, i think  (Read 2147 times)

0 Members and 3 Guests are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
hello,  

when i was in school i thought of an idea to make airplanes do barrel rolls and posibly even loops.

im not sure it will work but i think with a little experimenting it might work.


U know how if you in an aircraft taxing and you hit somthing at low speed, sometimes your airplane will hop into the air on the side the object hit,

well would if sombody made a script that put a (pallet, fuel barrel,chair) or some other small object in side the planes wing when its flying,

it might make the planes wing on that side hop up, and if u did it again a half a second later, then it would make it roll all the way over maby,

if u used set velocity, then you could get the plane to not stop,

it just would need a lot of experimenting, I would be happy to beta test 24-7 for sombody tring to make this.

it would be great for cutsceens,
maby with some tweaking and an eventhandeler "fired" then u could make AI planes roll to avoid missile or cannon fire.

and even if it looked kind of jerkey and made wierd noises,
nobody would know because its for AI, and players would be to far away to notice the jerking usualy.

i hope sombody tries to make it,

thanks
« Last Edit: 16 Mar 2005, 22:40:46 by penguinman »

Kyle Sarnik

  • Guest
Sorry, not gonna happen.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
I know nothing about modelling, and almost nothing about configuring, but it seems like barrel rolls could be done this way:

It is possible to make certain parts of a model rotate along a certain axis (e.g.: goggles rotate up/down on a unit's helmet; scud rotating up into firing position; radar dish spinning; etc). If you could simply make the ENTIRE plane rotate around it's long axis (nose to tail), then there you go, you have a barrel roll. All you need to do next is make a script that monitors changes in the planes pitch & velocity, and then animates the barrel roll when appropriate.

It seems rather simple, so I guess someone would have done it by now if it were possible.
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 penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Quote
Sorry, not gonna happen

do you have any reason you dont think it will work or are you just psychic ;)

what do u mean, why not!??


it may take a while to do, but being able to control pitch in ofp is worth it.

i think quicky, putting a barrel in the wing going the same speed as the plane, will cause the plane to be displaced, since the barrel is being held and cant be displaced so the planes wing will insted.

and if you have a setdammage and velocity loop on the plane, it should work,

@barron: hmm, but would new addons need to be made?

i think im gona wait until an expert scripter gives it a no before i give up, i really think it could work.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Hm Interesting. I'm not responding as an 'expert scripter', but here are my thoughts as to why I think it is unlikely to work:

Could you make it reliable? Keeping in mind that the plane can be travelling very fast, or slow, and that the plane DOES bank a little when turning, could you calculate the exact position of the wings at any given moment? Can you ensure that *every* time the script runs, the output is exactly what is desired, ie the plane always behaves exactly the same way each time. This is a major problem I always have with my scripts; scripts are temperamental little buggers that run differently depending on: the amount of stuff on screen, the fps, the time acceleration factor. Getting them to do the same thing each time is a real hassle

Can you make sure the wings rotate in the direction you want? If you're just sticking the barrel/whatever where the wings are, how do you know the plane will be bumped up as opposed to down? Again, this is reliability.

Can you make the script generic, ie it will work for any plane, including any addons. The answer to this is probably no, not without a whole heap of testing for every type of plane you want to run the script on. This means hard work for a scripter who's using a new addon. Having said that, it would be possible to get the most common aircraft, the a10,'s dimensions and go with that.

Sorry to be negative about it, I just wished to examine the common problems that occur with this sort of thing. It's script's fault, really, it's not robust at all.  :-\ I just have a gut feeling that this won't work.  :P But then again... I'm often wrong :P

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Quote
I'm often wrong


Does this mean you might be wrong.........about being wrong?


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

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
I might be...  ;D

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
good points.... :)


well, considering there are only 2 planes in ofp,

i think that we could make a version compatable with only ofp planes, once we have that we can start expanding, its not as hard as one should think,   ie: the big planes which i think compose about 35% of ofp plane addons wont be doing barrel rolls like c-130s and stuff, so we dont need to worry about that. and alot of them are  IE: just the A10 with maby a few diffrent model changes from the bis one but the wing span and stuff is the same so i think its almost safe to say they wont need very much testing.

well, about the speed. I think if it used a getspeed _plane type thing and like if the speed is from

60-100 then use script part A

100-140 then use script part b and so on.

each script part would set the barrel in a miniscuely different place then the others.

 
Quote
not without a whole heap of testing for every type of plane you want to run the script on.
dont worry about that, il be happy to do all the testing needed. ive got way to much extra time.

im positive it can be scripted but about this

Quote
Can you ensure that *every* time the script runs, the output is exactly what is desired, ie the plane always behaves exactly the same way each time.

that may pose a problem, but considering that the mission maker will be telling the plane where and when exactly the plane will be performing the manover, via a trigger, then it should be manageable.

it should be easy for sombody to script, but geting the barrel to go in the exact position through lots of testing is the hard part.  But il take care of that.

so on that note anybody wana try it.


Kyle Sarnik

  • Guest
I know nothing about modelling, and almost nothing about configuring, but it seems like barrel rolls could be done this way:

It is possible to make certain parts of a model rotate along a certain axis (e.g.: goggles rotate up/down on a unit's helmet; scud rotating up into firing position; radar dish spinning; etc). If you could simply make the ENTIRE plane rotate around it's long axis (nose to tail), then there you go, you have a barrel roll. All you need to do next is make a script that monitors changes in the planes pitch & velocity, and then animates the barrel roll when appropriate.

It seems rather simple, so I guess someone would have done it by now if it were possible.

No, you cannot get entire models to rotate, since proxies, turrets, etc.. (anything thats not hard fixed to the thing) would not rotate.

As for penguinmans idea, its just way too damn uncontrolable. Don't forget that a plane also has more mass than barrels, and when in the air traveling at high velocities, at best you would send the barrel flying across the globe, and thats if you can get the plane to hit it, which would also be unreliable. Over all this is too unreliable, and I must say that your theory about it even working in the first place is wrong. I am telling you a fact here, this will NOT work, and it NEVER will. Sorry, we are just going to have to wait untill OFP 2 for that. Besides AI can hardly fly planes effectivly as it is, and barrel rolls would probably result in alot of dead AI  ;) . Also, AI would never ever ever ever know when or how to use it, and well, im going to stick with my statement of this NEVER working.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
well, if you think it wont work, then prove it.

and the only way to prove it wont work is to try to make it work.

so if u try and actualy try to make it. and you cant, then i will accept it.

and about the barrel, If you use a combination of getVelocity, setVelocity,SetPos, and Getpos

then you can make it hit the barrel every time.
and if youve ever tried placing a barrel under the wing of a parked A10 and giving it a set velocity, to make it shoot straight up at about 100, it makes the wing of the plane shoot up so the wings are almost verticle.

now, at those high speeds you may need to have a setdammage 0 loop on the plane.

I know that it can be done. but it may take so long to do that ofp2 will come out first.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Quote
well, if you think it wont work, then prove it.
Don't be ridiculous.    You can't prove a negative.    

Moreover, Kyle Sarnik is a knowledgeable and respected member of the editing and scripting community.    He is usually right.   If he thinks it won't work then it is you who have the proving to do, not him.


Quote
I know that it can be done.
Well then stop wasting time talking about it and show us how its done.

From my position of almost complete ignorance, it seems to me that it may be just possible, but unlikely.   Conversation on this topic however, is clearly utterly pointless.    Either make it happen and prove the doubters wrong, or shut up.   If you don't have sufficient scripting skill to make it happen, then learn.

Quote
i think im gona wait until an expert scripter gives it a no before i give up,
Errr, an expert scripter already gave you a no.   ::)     A remark such as this is just rude.     (Although to be fair another expert give you a "just maybe", although that does not excuse your rudeness.)

The bottom line is that this is an old game:  if it was easy the odds are that somebody would have done it by now.    And if they haven't, then hey, you can do it.
Plenty of reviewed ArmA missions for you to play

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Quote
Don't be ridiculous.    You can't prove a negative.    



you can prove a negative,

if one scientist says, theres alien life on mars
another scientist says no theres not,
so the first scientist says, ok prove that theres no life on mars, so the 2nd scientist gets on a space ship, goes to mars and dosent find anything, then the second scientist just proved to the first one that there is no life on mars.

a rather crude example but I think it drives the point



Quote
Well then stop wasting time talking about it and show us how its done
your right, but I dont know how.

Quote
If you don't have sufficient scripting skill to make it happen, then learn.
I will try, and in 2 or 3 years I will complete the script and by then ofp 2 will be out, no point

so i guess i will go with the second option,

i believe this was the one
Quote
or shut up
you can consider the discussion about it closed


Quote
A remark such as this is just rude
now that i think about it, yes it is rude, i hadnt realized it at the time so,  sorry about that kyle.


I guess I will give it up,


Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Quote
then you can make it hit the barrel every time.
This will not happen.
slight lag + fast speed = getPos/setPos/whatever misplacement...


Furthermore, Like Kyle already pointed out OFP AI can't control any vehicle even adequately... Well maybe walking and tanks, but that's about it, so if you make a AI controlled plane roll it will crash. period.

I once made a very simple setvelocity script for AI planes to be able to take off from those FDF Mod East Border short air airstrips and even that screwed the AI up... I had to 'slingshot' the plane insanely high up in the air or it would crash...
How this worked was that the AI started to accelerate on it's own and when a certain position was reached the setvelo script 'turbo-boosted' the plane and also helped a bit to get it off the ground so it was not even controlled by the script per se, just aided a bit...

And as OFP physics engine is so crippled there is nothing that would ensure you that when a barrel hits the plane the plane would roll... Most likely it would just spin out of control ...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.