Jump to content
Sign in to follow this  
[aps]gnat

Bridge laying problems

Recommended Posts

Well...its got me beat....searched the forums...can see some old hints as to people see this, but not in full.

I'm laying a long bridge @ 65 deg (on desert island) and the sections I am adjusting the height with eg;

  this setPos[getPos this select 0,getPos this select 1,-14.05]

in the init field. I have also tried "(getPos this select 2)-X" for the vertical axis to.

THE PROBLEM:

On slopes (ie shore) the bridge sections move X/Y and Twist (rotate) !!! crazy_o.gif

On very steep slopes the twist becomes very obvious. So it becomes impossible to cleanly match one section to the next.

What is going on?

And how do I fix/get around this problem?

I've tried messing with the sections coordinates in the mission.sqm file to fix but that doesn't seem to work either.

Is it some accuracy difference between getPos and setPos? And why would that make the bridge sections twist?!  sad_o.gif

Any help or hints appreciated.

Cheers,

Gnat.

Share this post


Link to post
Share on other sites

I did read somewhere that bridges have to be placed on level terrain?

i.e The two locations on Nogova. Are apparently, the only two possible places on the entire map.

Share this post


Link to post
Share on other sites

Hi [APS]Gnat

There is a simple solution.

Place the bridge sections on a flat peice of land such as the airport. Place the following in its init field

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this Setpos [(Getpos bridgelogic1 select 0) , (getpos bridgelogic1 select 1) , (getpos bridgelogic1 select 2) +1.2]

Place a gamelogic at the point you want the object to apear named "bridgelogic1" use one gamelogic per bridge section "bridgelogic2, bridgelogic3, etc." the code above needs to reflect the apropriate bridge logic for each section.

Pitch, Yaw and Rotation are taken from the original position so rotate the bridge section at the airport to get the right direction or use script to set direction. Choose an apropriate angled section of land to alter pitch and yaw.

Move the gamelogic to refine position its easier than setposing but you could just use setpos code if you want and get rid of the game logic. I think the game logic method is easier.

My Sainte Marie Hill mission uses this to level Pillboxes if you want an example.

Kind Regards Walker

Share this post


Link to post
Share on other sites

Thanks Walker, interesting solution.....I'll give it a whirl...

Cheers smile_o.gif

Share this post


Link to post
Share on other sites

Well... I tried it but the pieces still seemed to move.....but I did use half your idea to get a general solution.

I placed a string of bridges out at sea (boy it's a pain to get them to line up... at one map Zoom level, they do...at another Zoom level they dont ! Which reminds me, there must be a formula for the X-Y position...more research!) and then move or copy the string to where you want them. THEN you have to adjust the height of all of them with the setpos/getpos +/- Z line as above.......THEN you have to change the angle (10th and 100th of a degree !!) of any pieces over sloping land.

Always use a "sea section" as true quide for angle. The bonus (a small one!) is you dont have to change the X-Y of any pieces....just angle (land one) and height.

Still lookin for a better way..........

CHeers,

Gnat

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×