Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vehicle tips for making a tank

Snow Cone
Registered User
Join date: 6 Jun 2006
Posts: 15
02-11-2009 14:30
Hi all,
I've been scripting for doggawn ages but one area that's always had me befuddled is vehicles.
I want to make something that behaves very similarly to a tank. It ought to follow the up and down gradient of the terrain, but not the left and right. I want it to stick to the ground pretty tightly, and I want the movements to be solid, slow acceleration, fast deceleration, slow rotation. It should also stay put when you stop, not roll down the hill etc.

I've been hacking away with all the various flags and settings and I can't make sense of it.

Can anyone advise decent settings to achieve this sort of behaviour?

Many thanks,

Snow Cone
Taeas Stirling
Registered User
Join date: 4 Sep 2004
Posts: 74
02-11-2009 21:37
find yourself a copy of the realistic car script. Use the rear wheel scripts in all wheel positions so they dont pivot while turning, and build yourself a basic tank to tune with.
haul it over to the vehicle sand box and give it a spin or two. Now go to the scripters wiki and find the vehicle tutorial. Go down the list of flags, read the descriptions of each. Change them one at a time and test drive each time. be aware that anything with two decimel points wants a pretty small change, or things can get wild fast.
Now spend a day tuning it to be the best tank engine in sl.
Sorry there is no magic answer here but this is just the way its done, vehicles can just be tough at times.
The bright side is once you have done one, it gets way easier the next time.

Good luck
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-11-2009 23:49
Hmm. Maybe we can come up with some more specific advice. You're probably going to want a pretty high amount of friction. That means low friction timescales, but not so low that they interfere too badly with the motor. I suggest a high linear deflection (meaning small timescale) and very low angular deflection (very long timescale). Slow turning should be easy: low-magnitude angular motor and maybe a somewhat drawn-out angular motor timescale to make it feel a bit sluggish. As for the slow acceleration but fast deceleration, you might want to change the linear motor timescale depending on whether you are accelerating or decelerating. I think that should do it.

Other ideas for tank-like behavior: no banking, obviously. On top of loading down that vehicle with some solid prims to make it heavy, you might want to give it a NEGATIVE buoyancy. THAT ought to keep the sucker on the ground.

The best vehicle tutorial/documentation I have ever seen is here: http://www.lslwiki.net/lslwiki/wakka.php?wakka=TutorialVehicle
Snow Cone
Registered User
Join date: 6 Jun 2006
Posts: 15
:)
02-13-2009 13:25
Thanks guys, that's all great advice.
Hopefully I'll be able to pull something off.
Thanks again. I've posted before and received less than stellar responses. This is very refreshing.

Cheers,

Snow
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-13-2009 13:36
Glad to help. Let us know how it turns out. :-)