Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Basic airplane or motorcycle script with no brakes?

Rocky Rutabaga
isn't wearing underwearâ„¢
Join date: 14 Apr 2006
Posts: 291
08-19-2008 07:12
I'm a total bonehead with scripts. I'm looking for a simple transportation engine script that once you start it, it doesn't stop. No de-accel. Just go. If some kind soul would point me in the right direction, I'll just go. Thanks.
_____________________
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
08-19-2008 07:44
None of the vehicle scripts do that, they use energy and will eventually stop. You can make them go for a long time but they will stop. What is it for?
_____________________
From Studio Dora
Rocky Rutabaga
isn't wearing underwearâ„¢
Join date: 14 Apr 2006
Posts: 291
08-19-2008 11:01
Actually I found a basic boat script that works great. I simply had to turn off two controls: stop and back up. I also set the speed so that you can't accelerate either. The boat keeps going and never stops, which is perfect for my project.

And another unrelated but (probably) stupid question. How do I put a sit animation into the boat script? Can I just copy and paste in a pose script within the boat script?
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-19-2008 11:15
From: Dora Gustafson
None of the vehicle scripts do that, they use energy and will eventually stop. You can make them go for a long time but they will stop. What is it for?


That's not quite true. Actual vehicle functions (as opposed to non-vehicle physical movement functions) do not use "energy". They have decay time scales (e.g. VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE) that are DESIGNED to make them stop after a while though, precisely so you DON'T have a vehicle keep going forever without active control (imagine your car smashing through shops and houses while you are busy logging back in after a crash/disconnect... ;-) ). The friction parameters can also help with that if used properly.

All of that can be circumvented, especially if you apply motor values without user control input (e.g. using a timer); the real question is whether or not you truly want to.
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
08-19-2008 11:59
Try using llSetForce... you wont really be able to control the vehicle, but it seems like this might help you.