UNN 0 Posted July 3, 2005 Quote[/b] ]Well all I have to say is that everything allways seems sound untill you actualy test it, and thats where the problems start to emerge. Well fortunately Game Logics are here to save the day, in the pitch and bank department that is. Most of their idiosyncrasies where unearthed with MCar. Just got to figure out the best way of using them with Autocentre now. But yeah, par for the course with OFP. Multiply the complexity of the initial idea by 10, and your getting close to the final solution Share this post Link to post Share on other sites
offtime 0 Posted July 3, 2005 data: tank plus mg problem: same ground contact points dont give good results becouse setPos spoils everything solution: dont use setPos idea: after appearing tank and Mg on map read with high frequency velocity of a tank and set it to MG, dont use setPos. with proper mass and ground contact points, this theoreticaly schould work. assume anomaly every 10 seconds, so track positions of both object, in case of visible difference, use setPos. Share this post Link to post Share on other sites
UNN 0 Posted July 3, 2005 The problem lies within the fact that a vehicle driven by the player acts differently to one placed using SetPos or SetVelocity. With SetVelocity you still have to call SetDir, that is as bad if not worse than SetPos. I knocked up a script to test two identical vehicles, side by side. One driven by the player, the other Setpos'ed along side. [<Players Vehicle>,<AI Vehicle>] Exec "Script.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Vehicle=_This Select 0 _Vehicle1=_This Select 1 _Dir=GetDir _Vehicle _Pos=GetPos _Vehicle _Vel=Velocity _Vehicle _XPos=_Pos Select 0 _YPos=_Pos Select 1 _ZPos=_Pos Select 2 _Dir1=_Dir+90 If (_Dir1>360) Then {_Dir1=_Dir1-360} _XPos1=_XPos+((Sin _Dir1)*3) _YPos1=_YPos+((Cos _Dir1)*3) _Vehicle1 SetPos [_XPos1,_YPos1] #L _Dir=GetDir _Vehicle _Pos=GetPos _Vehicle _Vel=Velocity _Vehicle _XPos=_Pos Select 0 _YPos=_Pos Select 1 _ZPos=_Pos Select 2 _Dir1=_Dir+90 If (_Dir1>360) Then {_Dir1=_Dir1-360} _XPos1=_XPos+((Sin _Dir1)*3) _YPos1=_YPos+((Cos _Dir1)*3) _Vehicle1 SetDir _Dir ;_Vehicle1 SetVelocity _Vel ;_Vehicle1 SetPos [_XPos1,_YPos1] ~0.001 goto "L" Just uncomment either SetVelocity or SetPos and compare how each command responds to changes in the terrain. Share this post Link to post Share on other sites
General Barron 0 Posted July 3, 2005 I seem to remember suggesting this same method a while ago in this exact forum... I'd dig up the thread, but then again, I don't really care . Share this post Link to post Share on other sites
DBR_ONIX 0 Posted July 3, 2005 Another idea, use the setRelcamPos thingy, by getting positoin of gamelogic in cargo positon where the gun should be? Quote[/b] ]data:tank plus mg problem: same ground contact points dont give good results becouse setPos spoils everything solution: dont use setPos idea: after appearing tank and Mg on map read with high frequency velocity of a tank and set it to MG, dont use setPos. with proper mass and ground contact points, this theoreticaly schould work. assume anomaly every 10 seconds, so track positions of both object, in case of visible difference, use setPos. Didn't I point that out already? Anyway.. Possible ways : Setpos - Nope, can't be used fast enough Setvelocity - Almost, but it doesn't take into account the rotation Setdir - Similar to setpos setCamRelPos (on gamelogic) : This seems possible, but only for pitch? That seems odd.. A (tiny bit) of topic. Using config defined anims, it's possible to rotate polygons, by making selections of points and moving them around an axis. What happens if you animate the points where the missile come out of a plane?, or is it the same as not being able to animate proxys? (Which can be done it seems, the SCUD animates the missile proxy, no?) - Ben Share this post Link to post Share on other sites
SWIFT88 0 Posted July 3, 2005 Just thought i would make an official post that UNN and I have started work consisting of the majority of the suggestions. UNN has done an excellent job, and would like to thank him on making it work soo well. However it isnt finished and in early early beta, with bugs like Bridges and other annoying barriers. (Well i say UNN and i, but untill now UNN has done all the work) I would post some shots however i need to consult UNN on the scripts atm and will possibly post some-thing soon... *Watch This Space* Currently Addon makers to thank for inspiring work that has got us this far :- The guy that made the demo mission with the BIS MG setpos'ed in the back of a truck. (Perhaps it's going over board crediting some nameless guy) The MCar Project (For the game logic side, includes UNN) Col.Klink Phil Commando DBR Onix! any way i will leave you in suspense with what happens next Share this post Link to post Share on other sites
Greg147 0 Posted July 3, 2005 Just thought I'd point out this. Sorry if everyone already knows about it, but it's a tank with 2 seperate turrets, so it might help answer the questions back on the other page. http://psyproductions.proboards21.com/index.c....1899977 Also, the Lib41 mod had both a turret and a corse machine gun on their tanks, making a total of 2, with 2 gunners. Share this post Link to post Share on other sites
red oct 2 Posted July 4, 2005 just out curiosity, since your making two vehicles that are attached to one another, would that mean if the comander wanted to use this machine gun would he have to disembark from the tank than enter the M2? or could there be a script that would allow you to switch positions, like the turn in/ turn out feature or like how you could move from commander to gunner to driver? also, another question, the commander when turned out is able to rotate 360 and is able to look up and down somewhere around 60 to 70 degrees when you switch into 3rd person. why isn't just a simple matter of attaching the weapon on that part of the model? of course i know this isn't the solution because it would have obviously be done already. i just wana know why. but if it were possible than it would most likely mean you would have to switch into 3rd person mode to be able to use the gun since your unable to rotate around in 1st. Share this post Link to post Share on other sites
UNN 0 Posted July 4, 2005 Hi, Quote[/b] ]Just thought I'd point out this. Sorry if everyone already knows about it Yeah, that was some of the earlier experiments I was involved with, not sure how far Sa8geko progressed with it though. I'm in the process of catching up The lib Mod coarse mg (turret\2nd vehicle) does not conform to the terrain. But it does not need to really, as the turret is invisible and the gun does not move. Quote[/b] ]could there be a script that would allow you to switch positions, like the turn in/ turn out feature or like how you could move from commander to gunner to driver? Yeah, thats easy enough. Quote[/b] ]the commander when turned out is able to rotate 360 and is able to look up and down somewhere around 60 to 70 degrees when you switch into 3rd person. I don't think he can fire his own weapon, as all his commands go to the gunner and driver of the tank. I doubt there is a perfect solution for OFP, it's just a matter of removing as many glitches as possible...Oh and keeping your fingers crossed for the possibility in Armed Assault Share this post Link to post Share on other sites
gandalf the white 0 Posted July 4, 2005 Currently Addon makers to thank for inspiring work that has got us this far :-The guy that made the demo mission with the BIS MG setpos'ed in the back of a truck. The MCar Project Col.Klink Phil Commando you forgot one tiny person: the guy that took your vehicles apart and posted his progress: DBR Onix! why credit somebody noone knows, right? what a laugh! EDIT: and he even created this topic! how ironic that you could've missed him! Share this post Link to post Share on other sites
Messiah 2 Posted July 4, 2005 excellent constructive post there - On that basis, they forgot me for making the landrovers, and deliltmon for making the originals. didnt see that he was initially using our landies... i dont remember getting an email asking permission nice work lads - Seen the video of it in action, and also have it on my HD - looks very promising if the small bugs get ironed out Share this post Link to post Share on other sites
h - 169 Posted July 4, 2005 Quote[/b] ]excellent constructive post there Anyway, DBR_Onix somehow always gets forgotten When he started the thread that later evolved into producing the Kegetys' FWatch and the similar thing by vektorboson it was like page 2 DBR_Onix was forgotten already Tough luck, buddy Share this post Link to post Share on other sites
DBR_ONIX 0 Posted July 4, 2005 excellent constructive post there - On that basis, they forgot me for making the landrovers, and deliltmon for making the originals.didnt see that he was initially using our landies... i dont remember getting an email asking permission nice work lads - Seen the video of it in action, and also have it on my HD - looks very promising if the small bugs get ironed out I asked for permission on the thread they were released And this time I was only forgotten on the 3rd page, getting better I suppose... Uh? Theres a video..? I seem to have missed that.. Do I transmit transparency or something? - Ben Share this post Link to post Share on other sites
SWIFT88 0 Posted July 4, 2005 Just thought i would make an official post that UNN and I have started work consisting of the majority of the suggestions. UNN has done an excellent job, and would like to thank him on making it work soo well. However it isnt finished and in early early beta, with bugs like Bridges and other annoying barriers.(Well i say UNN and i, but untill now UNN has done all the work) I would post some shots however i need to consult UNN on the scripts atm and will possibly post some-thing soon... *Watch This Space* Currently Addon makers to thank for inspiring work that has got us this far :- The guy that made the demo mission with the BIS MG setpos'ed in the back of a truck. (Perhaps it's going over board crediting some nameless guy) The MCar Project (For the game logic side, includes UNN) Col.Klink Phil Commando DBR Onix! any way i will leave you in suspense with what happens next Ive recorded a video Share this post Link to post Share on other sites
DBR_ONIX 0 Posted July 4, 2005 Ah, this?... wait, no (Wheres that blushing emoticon gone ) The video been released? Anyway, good luck with it - Ben Share this post Link to post Share on other sites
tankieboy 0 Posted July 4, 2005 Yes mate, that one. Share this post Link to post Share on other sites
Messiah 2 Posted July 5, 2005 no... private viewing of the video - seeing as i have an older working example in pbo form, i dont have to watch it Share this post Link to post Share on other sites
SWIFT88 0 Posted July 5, 2005 no... private viewing of the video - seeing as i have an older working example in pbo form, i dont have to watch it  Lets put it this way.... UNN is making a nice script for the WMIK, and it is working very nice atm. I would release a video but i would have to kill you........ Im sorry if i didnt quote a few people that needs credit but obviously i only quoted the names that we have been using previous scripts from, and inspiration. I.E The 50.cal set pos script, the Col. Klink Pboat, The M1 and M2 gun script etc etc, and MCAR No offence for leaving you out DBR_ONIX sorry mate.... Only small problem is going over bridges with the GIMPY (GPMG) on the front.... I was thinking of a script like :- _Height (getheight _vehicle) maybe that would help??? I would put _posy = (getpos _vehicle select 1) but it seems that setpos would mess around with the Proxy position and send arse over tit good job UNN... screen shots will be released soon Share this post Link to post Share on other sites
Messiah 2 Posted July 5, 2005 to be brutally honest, at the end of the day if the only bug that remains is going over the bridge, then i reckon 99% of the community could cope... i sure could Share this post Link to post Share on other sites
DBR_ONIX 0 Posted July 5, 2005 Yeh, bridges aren't a big problem, theres not that many, and if they need to be used, you can use two triggers to teleport any vehicles across the bridges, not the best but it solves a lot of problems. Things like trailer scripts have this problem too, but really it's a small problem. Anyway, excelent work *Ticks of line on engine limiation, which doesn't acctualy exist as far as I know.. * - Ben Share this post Link to post Share on other sites
SWIFT88 0 Posted July 5, 2005 how about if you where like some VCB idiots and drive off a ledge on CATshits afgan island.... LOL cough Bam cough Share this post Link to post Share on other sites
Messiah 2 Posted July 5, 2005 managed to flip the last pbo you sent me swift, and that didnt have a great affect on the setpos weapon Share this post Link to post Share on other sites
UNN 0 Posted July 6, 2005 Hi, Quote[/b] ]managed to flip the last pbo you sent me swift, and that didnt have a great affect on the setpos weapon Lol It would be possible to test for some of these events, any extreme changes in pitch or bank or someone hurling themselves of a cliff You could then shut the turret scripts down. But thats more stuff running in the background? No better news with bridges either ATM. I still want to test somethings out, to get a better idea of the problem. Share this post Link to post Share on other sites
philcommando 0 Posted July 6, 2005 Not sure of this would helps, but based on my own previous researches:- 1. Bridges are objects setpos above island formatted water. 2. Tanks and other vehicles have problem moving on top of objects 3. M113 class based vehicles are the only vehicle tested that moves over bridges/objects above water. 4. Some human class objects do not cross unofficial bridges even with pathlod unless you place another object on the other side and give a domove command. Solution:- 1. Create an invisible roadway addon in 64m size. with the correct 'pb' memory points. 2. Set the vertices 'above ground' in vertex properties 3. pack this addon together with your multiple gun vehicle, so that mission planners can place such roadway addon on bridges. 4. or convert your vehicle to M113 class vehicle. -------------- A crazy thought--------------------- The above is meant for bridge crossing but you may encounter a problem of the attach object droping to sea level once it manages to cross the bridge. 'There are 2 'heights' it seems in ofp - Absolute and relative height. While crossing the bridge over water, the main object uses relative height of the bridge surface level which is 0 but the attached object's height (z axis) uses absolute height -sea level. What would be the mathematical formula to reconcile both heights to maintain an equalibirum?' Is there a way to lock the attached object's z axis to the main object's height? # loop _attachObject this select 2 = (_mainObject this select 2)+K Â goto loop where k = formula of calculating absolute height between an object on land against sea level in ofp would it work? ---------------------A crazy thought-------------------------- Edit:- It may seem troublesome, complex and a lot of trials and errors, but once the limitations are broken, it will be easy to do the next addons. I'll bet Zwarda faced the same problem trying to get the first addon into ofp 4years ago. It was only a chair! But it led the way to spectacular addons of the likes we once thought impossible in ofp! Share this post Link to post Share on other sites