Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help with vehicle scripts

Aleksandr Martov
The Artist
Join date: 12 Jun 2004
Posts: 86
06-27-2004 15:16
My greetings to all of the script gurus out there. I have a bit of a request (challenge?) for anyone so inclined. I'd do it myself, but I have the scripting skills of a steamed vegetable, so i need some help.

I've recently become enamored with the process of aircraft design, and I've sucessfully built a few aircraft, one of which is the puropse of this post.

The aircraft is a Ducted-Fan VTOL, with both helicopter and airplane characteristics. It has an airplane-like fuselage, with a pair of large ducted-fans astride the center line. These allow it to Take off like a helicopter, but move like an airplane.

What I need a script to do the following:

-Move like a helicopter,
-Move like an airplane,
-Switch back and forth from VTOL to plane (easily),
-Rotate the Fans about 20-30 degrees when the craft switches from VTOL to plane, and move them back when it switches back,
-Rotate the entire craft about 5-10 degrees when switching from VTOL to plane, and to rotate it back when it switches back.

So, there you are. Any help on this matter would be awesome, and I'll be happy to sling whatever compensation I can to anyone who helps me out on this. Feel free to post here or contact me in world.

C'mon gurus, you know you wanna!

AM
_____________________
I got monkies in me!
-Gir
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
Re: Help with vehicle scripts
06-27-2004 18:16
I'm not into vehicles but I can offer you some advice.
Vehicles, and indeed all physical object, have to be made with 31 prims or less. The occupants count as prims, so for a single occupant, you have to work with 30 prims, and for two occupants, you have to settle for 29, and so on and so forth.

From: someone

-Move like a helicopter,
-Move like an airplane,
-Switch back and forth from VTOL to plane (easily),

This is probably easy for any decent vehicle scripter and has probably been done before.

From: someone

-Rotate the Fans about 20-30 degrees when the craft switches from VTOL to plane, and move them back when it switches back,

This is hard to pull off. Rotating child prims in a linked set is difficult to get right and making more than one child prim rotate together in a coherent and predictable way is nearly impossible.
If you want to see this happen, make sure whatever you call the fans are a single primitive each, and dont expect them to move perfectly synchronized.

From: someone

-Rotate the entire craft about 5-10 degrees when switching from VTOL to plane, and to rotate it back when it switches back.

This is trivial and can be accomplished in a single line of code.
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
Re: Re: Help with vehicle scripts
06-29-2004 05:12
From: someone
Originally posted by Eggy Lippmann
I'm not into vehicles but I can offer you some advice.
Vehicles, and indeed all physical object, have to be made with 31 prims or less. The occupants count as prims, so for a single occupant, you have to work with 30 prims, and for two occupants, you have to settle for 29, and so on and so forth.


Mostly true, though if your willing to live dangerously, you can make do with simply 30 prims for any number of passengers. Just don't expect to be able to restart it if it looses physics on a sim border crossing.

From: someone
Originally posted by Eggy Lippmann
This is probably easy for any decent vehicle scripter and has probably been done before.



Indeed. Setting the mode switching up is quite simple. Harder, however, are controls, since a VTOL craft and a traditional airplane don't use the same basic methodology. You can set it up this way, I have before several times, but relying on conditional statements (Ie, if(mode == 1) if(level & CONTROL_UP)...) has its own problems, namely introducing lag into the controls.


From: someone
Originally posted by Eggy Lippmann
This is hard to pull off. Rotating child prims in a linked set is difficult to get right and making more than one child prim rotate together in a coherent and predictable way is nearly impossible.
If you want to see this happen, make sure whatever you call the fans are a single primitive each, and dont expect them to move perfectly synchronized..



Extremly true.

Though with certian combinations of shapes and certain situations, its not nearly as noticable as it is in others. Ducted fans in particular; if your ducting is sized and shaped right, and so is your fan, no matter how out of sync they move, you won't be able to notice easily, since the fan is mostly concealed anyhow.


From: someone
Originally posted by Eggy Lippmann
This is trivial and can be accomplished in a single line of code.


Depends what your talking about.

Setting the vehicle reference frame can't be done while a vehicle is in operation.

llSetRot may or may not work (Offhand I cant recall if its one of those that wont work if your object is physics enabled... I think it is).

llLookAt or llRotLookAt both would override the ability of the plane to control in other respects while it was in operation.

Applying either a rotational impulse or angular motor would work, but, would be a little more complex than a single line of code.
Aleksandr Martov
The Artist
Join date: 12 Jun 2004
Posts: 86
Well, that's all well and good, but...
06-30-2004 04:13
Well, at least I know it can be done.

Unfortunately, that doesn't mean that I can do it. While I am willing to learn some script, I think that this may be a bit beyone the scope of my ability for QUITE some time (read: forever)

Is there anyone here who would be willing to collaborate with me in doing at least some of these? I could perhaps offer some sort of compensation if my eternal grattitude isn't enough.

If nothing else, could I get some functions and basic scripting thrown at me to try and work with? If I had a basic outline or idea, it would be much easier for me to figure out the particulars (not to say that it would be easy in any capacity, but every little bit helps)

Well, any rate, thanks for the attention, Peace.

AM

PS: I'vee started flying my craft around with a basic flight script. It's white with bright orange components. If you see me in game feel free to say hi and perhap even come for a ride, as it's a two seater.
_____________________
I got monkies in me!
-Gir
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-30-2004 05:05
Notable vehicle crafters include Cubey Terra, Huns Valen and Garth Fairlight. Try getting in touch with one of those and see if they can help you out.
Aleksandr Martov
The Artist
Join date: 12 Jun 2004
Posts: 86
06-30-2004 10:52
Thanks
_____________________
I got monkies in me!
-Gir
Zak Escher
Builder and Scripter
Join date: 3 Aug 2003
Posts: 181
06-30-2004 12:09
I have bought a plane in world from Shadow Weaver (I think that is who it's from.; I can't tell right now because I'm at work). It has a hover mode and a flight mode that work very well and have little if any noticeable lag. You might contact Shadow for some scripting tips.
_____________________
Zak Escher
Unity Shapes
http://slurl.com/secondlife/Hatteras%20Island/125/46/31
http://unityshapes.blogspot.com/
See what I have for sale at SLExchange