Vehicle set-up tutorial or explanation?
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-01-2008 09:25
I've been doing a lot of searching all over the place for knowledge on how to set up a vehicle. (a blimp to be exact) I'm finding some excellent tutorials, however, all of them seem to start somewhere around advanced level, chapter 17!
Where can I find a simple explanation starting with the root prim, and the basics of what the script inside needs to do? I'm happy to spend time and work on the advanced stuff once I'm there, but where are the vehicle basics? Maybe scripting is the wrong forum, since my problem is more: what do I need to do before I get to the advanced scripting?
Does anyone have a basic full-perm vehicle (any vehicle, not just a blimp) that can be used to take apart and debug?
Thank you, --Avion
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
07-01-2008 10:22
Vehicles are much like particles. None of them need much scripting. When you have your basic script with controls and camera controls it is more a question of giving the right parameters. What I experienced is that 'trial and error' is how it is done. Sorry I can't offer more help.
_____________________
From Studio Dora
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-01-2008 10:53
You've seen this one? It's where I got started, and does a great job explaining how they work IMO. http://www.lslwiki.net/lslwiki/wakka.php?wakka=TutorialVehicle
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
07-01-2008 10:55
There are a few example vehicle scripts in the scripting library forum here, or you could examine the buggy in your inventory Library section.
I'm afraid that learning how the parameters actually work in practice is indeed a matter of trial and error; be prepared to spend a lot of time upside-down. Also, er, there are still Havok 4 vehicle system bugs around. It isn't insurmountable though.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-01-2008 11:42
Thanks for the replies!
Ordinal, I didn't realize I had the buggy available: I look forward to trying that!
Hewee, that's one of the tutorials I read last night. It's very detailed and informative, but to me it seems to be skipping way ahead. It is missing information that is probably really obvious to all of you. Let me summarize what I've cobbled together from lots of searches, and maybe someone can help me fill in the gaps and correct me, and diagnose why my blimp won't fly. None of these things are in the tutorials, which makes me think that surely somewhere there exists a vehicle-making for dummies, something like one of Torley Linden's videos (like the ones showing how to build a quickie house, dress your avatar, or disable camera contraints.)
I feel like I'm not even at the point where I can get started. i.e. I need to "play" at least the very beginning before I can start to plug. BTW, I can build a really nice looking vehicle, but so far I've never been able to make it do anything besides just sit there. I put what I thought was a vehicle balloon script into an alleged root prim, but couldn't make anything happen.
Anyway, my feeble knowledge thus far:
A vehicle has to be 32 prims or less. It must have a root prim, which contains __???__ script. The root prim must be oriented __???__ If the vehicle is over _???__ size it won't move. A vehicle over __???___ kg won't move. (SL prims have a mass?) There is a way to script a larger vehicle, which is __???__
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-01-2008 14:35
From: Avion Raymaker Anyway, my feeble knowledge thus far: Ah. Let me see if I can help answer some of these a bit. From: someone A vehicle has to be 32 prims or less. Less, but you've got it. Also, those "prims" include any avatars sitting on the vehicle. So if there are 29 real prims in the vehicle, it's only going to work as long as one or two avatars sit on it. No more. From: someone It must have a root prim, which contains __???__ script. The root prim will generally have the script in it that sets the vehicle parameters. Often this script also accepts the control input from the vehicle's occupants (e.g. "the pilot"  in order to set the parameters that change dynamically to move the vehicle (usually VEHICLE_LINEAR_MOTOR_DIRECTION and VEHICLE_ANGULAR_MOTOR_DIRECTION; the rest of the vehicle parameters often don't change in the course of the vehicle's movement, but there are, of course, exceptions). It's possible to get control inputs from other scripts and communicate them to the main vehicle control script too, or break up responsibilities in other ways, but often in simple vehicles it is setup simply to have the one script do all the pilot/control stuff. From: someone The root prim must be oriented __???__ The simplest orientation is to have the root prim's x-axis pointed "forward", the y-axis pointed to the "left", and the z-axis pointed "up". This is how the avatar's coordinate system works, and many vehicle functions are built to use this setup. You CAN set it up differently using VEHICLE_REFERENCE_FRAME, but most people find it easier to simply build the vehicle so they don't have to. From: someone If the vehicle is over _???__ size it won't move. A vehicle over __???___ kg won't move. (SL prims have a mass?) There is a way to script a larger vehicle, which is __???__ Actually the earlier question about the maximum number of prims covers this. There is (unless Havok 4 has changed this) no actual mass/weight limit. Unlike non-vehicle physical movement functions, the vehicle functions do not use energy, and everything is specified in terms of velocity and angular velocity, not momentum. So mass doesn't matter. Scripts for "larger" vehicles really refer to scripts people use to move "vehicles" that are larger than 31 prims (e.g. starships) and thus must move using non-physical movement functions (llSetPos(), llSetPrimitiveParams(), etc.). Hope all of that helps. If you have other questions, by all means post them!
|
|
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
|
07-02-2008 00:24
Hi Avion, someday I'll take this apart and start tinkering with it too, thought it would be helpful for you to see one that works and how, it is copy, mod & transfer and FREE!. Have fun. http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=304873
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-02-2008 11:19
Thanks very much for all this help, everyone. I'm very excited to go try all your suggestions, and to download that example. Dekka, I tried to debug another full perm freebie car, but I couldn't see the script. Should I have moved the script to my inventory first, to be able to see it? (not in-world now to try it out). From: Hewee Zetkin Scripts for "larger" vehicles really refer to scripts people use to move "vehicles" that are larger than 31 prims (e.g. starships) and thus must move using non-physical movement functions (llSetPos(), llSetPrimitiveParams(), etc.).
So, Hewee, the fact that my blimp wouldn't move was likely unrelated to its large size? It is less than 20 prims, but it's about 35 meters long. --Avion
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-02-2008 11:45
From: Avion Raymaker So, Hewee, the fact that my blimp wouldn't move was likely unrelated to its large size? It is less than 20 prims, but it's about 35 meters long. As best I understand, that is true. I'm not sure if Havok 4 may have changed things, but I believe the functionality was SUPPOSED to stay the same, so if it is different purely due to H4 I believe that would be a defect.
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
07-02-2008 11:57
From: Hewee Zetkin Scripts for "larger" vehicles really refer to scripts people use to move "vehicles" that are larger than 31 prims (e.g. starships) and thus must move using non-physical movement functions (llSetPos(), llSetPrimitiveParams(), etc.). Or use an attachment that has most of the vehicle prims. Basically, you make a low-prim vehicle base that has the physics scripts and seats for all the passengers then have the owner/driver wear a high-prim attachment that has all the visual bits of the rest of the vehicle. It's a little tricky to get everything lined up correctly but it can certainly be done (and has been done).
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Avion Raymaker
Palacio del Emperador!
Join date: 18 Jun 2007
Posts: 980
|
07-04-2008 08:39
From: Hewee Zetkin Ah. Let me see if I can help answer some of these a bit.
The simplest orientation is to have the root prim's x-axis pointed "forward", the y-axis pointed to the "left", and the z-axis pointed "up". This is how the avatar's coordinate system works, and many vehicle functions are built to use this setup. You CAN set it up differently using VEHICLE_REFERENCE_FRAME, but most people find it easier to simply build the vehicle so they don't have to.
Hope all of that helps. If you have other questions, by all means post them! Okay I'm making very encouraging progress on this thanks to the helpful replies. Dekka, that blimp is very cool -- Its flight dynamics are exactly what I'm looking for so I'm hoping I can duplicate it. The kart in the library was also really helpful, thanks Ordinal! In fact there is a note inside it saying "this is intended as an example to help you make your own vehicle," or something. Taking that apart and trying to understand it actually got me to the point where the blimp is moving. It's terrible, and it bounces around and crashes, but at least it's a VEHICLE now!! Hewee, this question is a little embarrassing since I've been a hard-core builder for a year, but hotels don't need to utilize dynamics! So, I can't figure out how to tell where the prim is pointing. No matter how I rotate it, the arrows always point in the same direction. What should I be looking at? The degree rotations under "object?"
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-04-2008 12:07
From: Avion Raymaker Hewee, this question is a little embarrassing since I've been a hard-core builder for a year, but hotels don't need to utilize dynamics! So, I can't figure out how to tell where the prim is pointing. No matter how I rotate it, the arrows always point in the same direction. What should I be looking at? The degree rotations under "object?" Oh. No worries. Just change your ruler mode in the top of the edit window to "Local". Then you might need to move the prim slightly or select another one temporarily before going back to the first for the arrows to actually show the prim-local frame.
|
|
Soo Novi
Registered User
Join date: 12 Mar 2007
Posts: 10
|
Vehicle Tutorials at the Ivory Tower
08-01-2008 04:45
Have you visited the Ivory Tower? They've recently added a vehicle tutorials room that you might find helpful. I'm sorry, I'm not in world at the moment and therefore can't give you the slurl, but you should be able to do an in-world search for Ivory Tower and once there just go look for the vehicle tutorials. You might have to go to the end of the prim tutorials to find it, but it's in there. An entire room full of step by step vehicle tutorials.
I love that place.
|