Jump to content

Motorcycle Scripting


cgross220
 Share

You are about to reply to a thread that has been inactive for 1647 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hey everyone,

I recently started working on a motorcycle in Blender (3D creation program with SL support) but am now starting to get the point where I need to worry about scripting.  This is my first vehicle creation in SL and I just wanted to ask what all is required to make a fully functional vehicle that I can sell?  What all will I need to sript? How do I do menus?  How do I do a HUD?  Sorry if this is in the wrong area...I couldn't find anything else that would fit it better.

Thanks,

cgross220

Link to comment
Share on other sites

Start here >>>> https://wiki.secondlife.com/wiki/Linden_Vehicle_Tutorial .  You'll find freebie scripts all over the place, but work through that tutorial first or they won't make any sense.  If you're a novice scripter, dialog menus are not a good project to start on.   Learn basics, get some practice and then work up to handling menus.

Link to comment
Share on other sites

There are commercial scripts available that will provide all that. Serious bikers are very picky about their rides so if you want to sell your bikes I recommend you use a quality system as bikers look for specific scripts depending on  how they ride..  Karyn's sells a very popular set that are mesh enabled and allow the end user to set the bike up for the way they ride.  There are other brands as well. If you know bikers in  your target market you should ask them which brands they prefer.  You may even want to offer your bike in more than one brand of scripts.

You should look into a scripting system ASAP. Motorcycle scripts require that vehicles be built a certain way to function, mesh or not, and you won't want to finalize your bike without knowing those requirements,, if you don't already know them.  Chief among them is that the root prim must have a zero rotation when the bike is facing the direction of travel.  Traditionally your bike is limited to 32 prims or LI after scripting, but there is a cheat that some scripts have that allow for more although there is still a limit. 

Obviously you don't want to have a bike that has too high of a LI or people won't be able to rez it in many places.  Some riding sims restrict the LI of bikes you can rez/  The LI of mesh bikes can sometimes change drastically when the scripts are added due to physics requirements. My partner is a bike builder and a mesh maker asked him to script a bike for him.  The bike when rezzed was 17 LI, but when the scripts went in, it was 271! 

 

 

Link to comment
Share on other sites

There are commercial scripts available that will provide all that. Serious bikers are very picky about their rides so if you want to sell your bikes I recommend you use a quality system as bikers look for specific scripts depending on  how they ride..  Karyn's sells a very popular set that are mesh enabled and allow the end user to set the bike up for the way they ride.  There are other brands as well. If you know bikers in  your target market you should ask them which brands they prefer.  You may even want to offer your bike in more than one brand of scripts.

You should look into a scripting system ASAP. Motorcycle scripts require that vehicles be built a certain way to function, mesh or not, and you won't want to finalize your bike without knowing those requirements,, if you don't already know them.  Chief among them is that the root prim must have a zero rotation when the bike is facing the direction of travel.  Traditionally your bike is limited to 32 prims or LI after scripting, but there is a cheat that some scripts have that allow for more although there is still a limit. 

Obviously you don't want to have a bike that has too high of a LI or people won't be able to rez it in many places.  Some riding sims restrict the LI of bikes you can rez/  The LI of mesh bikes can sometimes change drastically when the scripts are added due to physics requirements. My partner is a bike builder and a mesh maker asked him to script a bike for him.  The bike when rezzed was 17 LI, but when the scripts went in, it was 271! 

 

 

Link to comment
Share on other sites

Mesh enabled is for any script available, just set your build to no shape, and set the few prims that hit the floor (wheels and such) to a shape.

Ever since mesh got introduced, LL allowed it the 32 limit is long gone :matte-motes-big-grin-wink:

No need for "cheats", here is how i do it myself all the time, and feel free to hop over to my inworld shop to test drive them. I use KCP scripts, and i can do it with any script out there...

 

*Seems to be whenever i use your parts i get a script error "Cannot enable physics" *

This problems is due to the fact that Linden Labs limited the amount of physical prims you can have (32 prims)
This has been ever since LSL/Linen lab started second life.

Solution

The easy way is to fix this problem

1 Link your build, now with mesh Linden lab allows you to set shapes (convex hull, prim, none). By using this method. You can actually up the limit to 256prims (linkset limit) to make it work!

2 Once linked, go into EDIT, and FEATURE , select shape (NONE) it will pop a error. Saying that the root needs to have a shape. This is NORMAL, and good, now basicly you have 1 prim that will be "seen" by the physics server/engine. Thus your vehicle will function.

3 Either make a seperate prims that you use as a base, or simply give every prim (mind the prim count) a shape that hits the floor. Or else your vehicle will do weird things (go through floors what not) so make sure you assign prims hitting the simfloor to a shape.

*I see various options, like gravity, weight what not how do i work with this and DOES it work*

Yes it DOES work, and i encourage anyone building vehicles to tweak/play with it. It only has effect on prims that HAVE A shape, and thus the physical prims of your build. Just select each prim in the linkset (edit linked prims) and toy with it.


This kind of covers it on that....

NOTE: most use KCP scripts these days, the have a script in the pack to enable it. I URGE you NOT to use it, but just do it as i said. This way it will NEVER ever FAIL. And it saves you one script in the vehicle, so keeps counts lower.

Enjoy !

 

*NOTE* i send this note out to my friends, and customers in my group as i mesh/sculpt bike parts all the time.

If you get KCP, just edit them to fit your needs, i suggest to look deep in to the script, there over 600 lines you can cap, not to mention play with the whole vehicle routine. Play with the weights of the prims, and friction you can get every bike to drive with a unique setting that way. Up to link limits 256prims  :matte-motes-bashful-cute-2:

Link to comment
Share on other sites

  • 6 years later...

As I understand it: the root prim must be right-side up and facing east. When you rez a box to be the root prim, it's okay to resize it, move it around , link it, but never, ever rotate it until after the rest of your vehicle is linked to it. Rotation needs to be 0,0,0. when using it for the first time. 

  • Like 1
Link to comment
Share on other sites

I know nothing about ACS, but in general vehicle scripts can use other axis orientations by setting the VEHICLE_REFERENCE_FRAME parameter with llSetVehicleRotationParam(), so maybe that's a hint about what can be changed in configuring this script. Or just use a root prim with the default orientation as Alyona suggests, which is pretty sure to succeed.

Link to comment
Share on other sites

4 hours ago, Alyona Su said:

As I understand it: the root prim must be right-side up and facing east. When you rez a box to be the root prim, it's okay to resize it, move it around , link it, but never, ever rotate it until after the rest of your vehicle is linked to it. Rotation needs to be 0,0,0. when using it for the first time. 

Exactly that.

The full instructions for the scripts are on the webpage for them, the help page has some video tutorials.

http://kcp.wikidot.com/

  • Like 1
Link to comment
Share on other sites

For objects to move/function correctly in SL a few basic 'rules' apply regardless if it is KCP/ACS motor vehicle scripts or any other brand.  The first and most important being that the root prim must be oriented to zero rotation facing east.  Other parts can, and likely will be oriented differently, but as long as the root prim is set properly when scripted the vehicle will respond properly.  Root prim orientation and rotation is X = 0.00000, Y = 0.00000, Z = 0.00000 with the 'front' facing east representing the front of the vehicle.  The root prim orientation in this manner allows the vehicle to operate correctly from keyboard commands.  Many parts builders/creators in SL do not follow the east facing forward orientation as they create their parts.  However, the key part for the assembled vehicle is scripts in the root prim itself.  The orientation of the root prim is what sets the proper orientation & direction of the entire vehicle after it is scripted.  That being said, there are some other issues that affect handling that might cause some consternation if not fully understood regarding creating parts and bounding boxes but that's a separate topic from this.

Edited by RoxyCyn
spelling
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1647 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...