D.murphy man   0 Posted February 14, 2006 Thought id spread the word of joy in the forums about yet another major engine barrier hacked down by a talented addon maker. Quoted from OFP.info site: Click it! Quote[/b] ]This news will only concern advanced addonmakers and scripters; Chris Hampson has sent us a 20 pages tutorial which is a very detailed breakdown of the GetBankPitch utility made by Dschulle, in order to share it with the addonmaking community.To make it simple GetBankPitch returns pitch and bank data of a vehicle in the game. It basically is there because Bohemia never provided a command which could do that for us. Example: I have a helicopter I am using GetBankPitch utility with. I write a script to record its pitch. It has the following code: _pitch = mychopper call GetPitch This will return the pitch in radians of the helicopter called "mychopper". It works also for bank. Enjoy! Share this post Link to post Share on other sites
raedor   8 Posted February 14, 2006 It's more a tutorial about functions, but nice anyway. Thanks. Quote[/b] ]... by a guy called snYpirNever heard about that guy Quote[/b] ]Denoir – Haven’t seen him for ages but he used to be a big moderator at the BI Forums. One of my favourite characters in the OFP community even though I hardly ever spoke to him and don’t know why he disappeared. Thought I’d mention him anyway.Looks like someone doesn't check the politics threads Share this post Link to post Share on other sites
Shashman   0 Posted February 14, 2006 OK the hours I've spent addon making can be counted on the fingers of one hand, but what's this for? Share this post Link to post Share on other sites
raedor   8 Posted February 14, 2006 OK the hours I've spent addon making can be counted on the fingers of one hand, but what's this for? As ofp.info says, it adds the "command" getPitch. Share this post Link to post Share on other sites
mr burns   133 Posted February 14, 2006 lol, i´d expected a lil bit more euphoria in a thread like this... Doesn´t this finally make Crew mounted MG´s on tanks possible ? Share this post Link to post Share on other sites
raedor   8 Posted February 14, 2006 lol, i´d expected a lil bit more euphoria in a thread like this...Doesn´t this finally make Crew mounted MG´s on tanks possible ? Hm, not really. We also need setPitch. Well, maybe it does, but only with some very very very strange workarounds. And btw, it seems like this function is quite old (made by Dschulle). I didn't know that, but it's standing there. Share this post Link to post Share on other sites
raedor   8 Posted February 15, 2006 @mods: Just found an older thread with the same theme: http://www.flashpoint1985.com/cgi-bin....=50532; So please close this one. Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 15, 2006 And btw, it seems like this function is quite old (made by Dschulle). I didn't know that, but it's standing there. Thanks for the thread, I am very grateful. I just like to point out before this thread goes any further that I did not make the utility that acquires bank and pitch information. It is entirely the work and brainchild of scripting genius Dschulle. However the utility came with almost no documentation at all and I decided that maybe it was time a lid was lifted on how these things are done so I could show other members of the community how to understand and potentially modify stuff like this. I have made two addons in the past but to be honest I get alot more pleasure breaking down barriers which stand in the way of people's understanding of things, which is why i wrote this tutorial. Again, I thank you greatly for starting this thread and I hope the tutorial I have made is of use for a long time to come Share this post Link to post Share on other sites
Shashman   0 Posted February 15, 2006 OK the hours I've spent addon making can be counted on the fingers of one hand, but what's this for? As ofp.info says, it adds the "command" getPitch. That doesn't answer my question... I wouldn't know what "getPitch" meant if a book about it was thrown at my face Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 15, 2006 Hm, not really. We also need setPitch. Assuming of course, somebody hasn't already got there first, then perhaps this is something I will look at in the future Share this post Link to post Share on other sites
raedor   8 Posted February 15, 2006 OK the hours I've spent addon making can be counted on the fingers of one hand, but what's this for? As ofp.info says, it adds the "command" getPitch. That doesn't answer my question... I wouldn't know what "getPitch" meant if a book about it was thrown at my face We already have setDir, to get the direction of an object. But as this is a 3D video game, we also need a command to get the pitch/inclination/downtilt/whatever. Share this post Link to post Share on other sites
Shashman   0 Posted February 15, 2006 OK the hours I've spent addon making can be counted on the fingers of one hand, but what's this for?   As ofp.info says, it adds the "command" getPitch. That doesn't answer my question...  I wouldn't know what "getPitch" meant if a book about it was thrown at my face  We already have setDir, to get the direction of an object. But as this is a 3D video game, we also need a command to get the pitch/inclination/downtilt/whatever. YES, but why would you want to get this information? That's what I'm getting at Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 15, 2006 For the purpose of making scripts that require bank and pitch data to work. Such as the pitching camera script I made. It would never work without being able to acquire the pitch data of the aircraft it was attached to. Trust us it's necessary Share this post Link to post Share on other sites
chops   111 Posted February 15, 2006 Once you've GOT the pitch of a vehicle, you could SET the pitch of another vehicle to that same pitch. This could be used to have two or more turrets on a tank or helicopter, by getpos, setpos and getpitch setpitch ing another vehicle (the turret) to the required spot. Something similar has been done by Col CLink with his boat addons, but boats dont need pitch in ofp, as they dont tilt like tanks or aircraft do. Of course I could be completely wrong Share this post Link to post Share on other sites
Guest RKSL-Rock   Posted February 15, 2006 Ok for those doubting thomas types... this sort of script could make a V22 viable or any other tilt rotor system...and a multitude of other possible applications. Thanks Chris Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 15, 2006 Ok for those doubting thomas types... this sort of script could make a V22 viable or any other tilt rotor system...and a multitude of other possible applications. Thanks Chris Your welcome Hope you saw yours and UNN's mention at the end of the document. I intend to release a fixed version of this utility which has the height above sea level bug removed. I used the original utility by Dschulle to get the pitch data for my pitching camera script. I noticed however that there were very slight fluctuations in the camera angle which I think were too much to be down to the loop time being too long. I suspect they were caused by the sea level bug. One question I do have, is does the distance command lose accuracy when called over large distances? Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 15, 2006 Of course I could be completely wrong I don't think you are But the setpitch function is a way off yet I think. Have a look at the thread I've started in one of the scripting forums (mission or config, can't remember which). Share this post Link to post Share on other sites
chris330 Â Â 0 Posted February 17, 2006 Link Heres an update relevant to this Share this post Link to post Share on other sites