Jump to content
Sign in to follow this  
Guest BratZ

Setpos bridge problem!

Recommended Posts

Guest BratZ

Well I have the Pak towing script working well except for the darn bridge bug...And recent news on this?I know I thought I was done,lol

Appears both the bridge and water are both at 0 height!

I have tried to setpos the distance difference and such but WTH!

It still moves in wrong position,either too high or too low.

I've tried various calculations and I get the difference in height but cannot setpos to where needed,I even have the towtruck that stays on the bridge but setting the trailer at that height at that time doesnt work either

Was curious on anyones input? I really need some expert opinions and this will benefit us all, I have the tow script now able to attach to any towtruck (the Pak has custom anims tho)

But HELP!!!! I will be on this till its worked out

Share this post


Link to post
Share on other sites
Guest BratZ

No help? I still been on it. I'll rephrase my question....has anyone ever setpos something on the bridge?

I cant do it by getting the object name and such tho,as i need it to work on any bridge

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (BratZ @ April 26 2003,04:56)</td></tr><tr><td id="QUOTE">No help? I still been on it. I'll rephrase my question....has anyone ever setpos something on the bridge?

I cant do it by getting the object name and such tho,as i need it to work on any bridge<span id='postcolor'>

yes i did, on the bridge in Nogova near Davle.

place a helo on top of bridge there by using following code in the init line of the helo.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setpos [getpos this select 0,getpos this select 1,18]<span id='postcolor'>

you might have to adjust that height(18) to something more suitable for that particular bridge you are using.

Share this post


Link to post
Share on other sites
Guest BratZ

Thank you Ralph Wiggum, that does work setpos a chopper or even yourself at start of game.Notice the choppers alt is 0 when it rests on the bridge.

So why cant I drive a truck across the bridge and setpos a trailer behind it? Setpos Z coord to 0 is on the water ,setpos to 20 would be 20 meters above the bridge.

I have a marker at 0 and I can get the difference that I need,but it doesnt work like that for some reason.

I've tried combinations of settings and even tried setpos it slightly in the bridge ,but once its so far off the water it starts using the bridge as 0 (setpos Z to .01 would be .01 off the water). Weird

I've tried almost every trick up my sleeve, someone must have encountered this and conquered it.

Share this post


Link to post
Share on other sites

I'm not sure why this happens either.

As far as i remember, in OFPCWC(1.46) the top of building was considered as 0 height, same as ground level. and as you went down to lower floors, the values went down(like -1,-2)

all that changed with OFPR. In OFPR, the heights that were read from command "setpos" seem to take consideration of more "realistic" numbers.

In other words, say there is a house that is 12 units high, and 3 stories high(so 4 units per story). In OFPCWC, the 0 height would mean 12th unit, the top of the house model. In OFPR, 0 height would mean bottom floor.

Similarly, if you used 12 for height, in OFPCWC, you would start of 12 meters(units) above the house, while as in OFPR, you'd start from the top floor.

for your script, I have no idea how it works, but i'm wondering if the script recieves height of the vehicle that tows. Maybe somewhere in the script, there is a line that gets the height of the vehicle that tows the stuff, and apply it to the object that is towed.

Sorry i can't help you more, but maybe someone at OFPEC might be able to help you better.

Share this post


Link to post
Share on other sites
Guest jacobaby

Bratz,

I would guess that the problem is caused by the bridge having a roadway LOD on the top surface. As with the choppers that use it, it makes for all kind of problems in detecting height.

I dont know how you script works, but what I think would work for you would be setting the position of the trailer relative to the towing vehicle. I think I discussed in another thread how to do this, but basically you need to DROP a point in relation to your towing vehicle, and then setpos to that.

hth

TJ

Share this post


Link to post
Share on other sites
Guest BratZ

Ya that is what I am doing actually,but the item dropped at the trailer position ends up on the water also(but you say DROP?), I also tried setpos to the height of the tow truck which results in same,like I said the bridge and the water is 0 ,and it sounds easy and all but doesnt work like we all would think.

Anyone want to look into it? (scripter...jacob,axe etc...)

I will be moving anytime and need to get this done!

Share this post


Link to post
Share on other sites
Guest jacobaby

Bratz.

Are you SURE you are dropping a particle and then setposing to that?

You need to create a particle with a lifetime of 0.001 and then position it at a point rear of your vehicle. It will always be in a relative position this way. Make sure your vehicle is named as the final element of the drop array, and position is set in the [x,y,z] of the array.

Sorry I dont have time to do it for you

TJ

Share this post


Link to post
Share on other sites
Guest BratZ

Well thanx that helps...I wasnt doing it that way and will try. I even just tried putting my own relaible roadway down and got same results.I iwill try what you are saying and thats a big help already.I know you are busy and thanx for replying.

Share this post


Link to post
Share on other sites

Hmm...really interesting problem here Bratz.... I've been trying 2 or 3 different ways since I saw the thread, but i can't seem to get it solved. I've tried setings its position from a relative and independent point from above, but it still goes through the bridge. I'm not sure how your doing the trailor or anything, but could setvelocity work? I haven't used set velocity in a long time so im not sure if that will work but I'll see if it will allow it to go across the bridge without sinking through biggrin.gif

I hope you can solve it! I've been waiting for a towing package!!!

Share this post


Link to post
Share on other sites

I just tried the set velocity ...and it works just fine across bridges... im not sure how easy it would be to tow that way though through turns, but it does work when your driving straight across the bridge biggrin.gif

Thats the only solution that i know of, I only have a little bit of scripting experience though! I'll keep trying, but I hope I helped a little confused.gif

Share this post


Link to post
Share on other sites
Guest BratZ

Well I havent gotten it yet and believe that Vibes has packed it up and sent it in

It still has the bridge problem, but at least others will get to see the design and build from that as it it very neat and includes a little mission showing some use of it.

It is very easy to use and still needs some reload animations and such and will have more bells and whistles in the final

I didnt attempt the setvelocity because of my experiences with my Helldiver tailgunner that you still need to setpos it on occasion as it does lose height and sometimes end up in wrong places

But I may be able to come up with something using that

Share this post


Link to post
Share on other sites
Guest jacobaby

a combo of the drop method and getdir setdir should make it bombproof.

Share this post


Link to post
Share on other sites
Guest jacobaby

Bratz,

I'll do it for you if you like, or guide you through.

icq 1 4 55 3 11 61

TJ

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  

×