wanna test a cross-platform vehicle script?


the talented Mick Scarbridge seems like the kind of person i would like to be! someone who is not scared to explore scripting and also someone who comes up with fresh ideas

“scared” might sound weird, but i definitely have an aversion to learning how to script in OpenSim. i used to think it’s because i do ActionScript and JavaScript in my day job and simply don’t want to do it in my “recreational” activities, but that’s just rationale for myself so that i don’t feel dumb or lazy

i fear failing with OpenSim scripting and i also fear creating crappy scripts that make my labour of love turn into a horrendous user experience! because of that (and actual laziness), all i tend to use are sit scripts (not even animated ones!) and omega rotations!

how lame is that!?! o_O

it would be too easy for me to say “well, i did a little scripting inSL, but then went to Opensim 0.6.7 and nothing worked, then some later version made my sits rotate by 90 degrees, and blah, blah, blah . . .”, but let’s call it what it is – fear!

now that i have gotten that off my chest (and copped out), is anyone interested in trying out Mick’s new cross-platform script for vehicles?

he’s been posting about here on the blog and made a nice pastebin version available (nicely commented too), so i think it’s okay that i mention it =)

ideally Mick’s script works in OpenSim, InWorldz, and Second Life

i haven’t tried it in Kitely or Sim-on-a-Stick yet and didn’t want to keep this to myself. if you try it and like it, comment on what grid you did and your experience with it. if you have constructive criticism, share that too!

i might secretly fire up SoaS here at work to see for myself, i’d love an easy vehicle script!

thanks Mick! =)

Pastebin location –

Twitter Tumblr Digg Reddit Stumbleupon Delicious Facebook Plusone Pinterest Linkedin Tumblr Posterous Snailmail

written by Ener Hax

July 19th, 2013 at 1:24 pm

posted in OpenSim,second life,virtual worlds

tagged with

16 comments to 'wanna test a cross-platform vehicle script?'

subscribe to comments with RSS or trackBack to 'wanna test a cross-platform vehicle script?'.

  1. will check it out in a day or two. looks useful.

    Keith Selmes

    19 Jul 13 at 2:51 pm

  2. Thanks for that script. It actually works fine in an opensim 0.76dev and definitly better than any I got my paws on up to now. I’ve got just two small problems to work out:
    – when rezzing the vehicle the script issues a warning about the script engine – but it is running fine (might be a config issue of the region)
    – the vehicle slows down considerably when making turns

    /me runs to plan for a nice racetrack :-)

    Orlando Frequency

    20 Jul 13 at 6:22 am

  3. I’m still working on the turning part as it is a bit derpy, however the overall cross-sim compatibility was what I was going for. I once tried using keyframed motion for the NPV rotation, but that was about as smooth as off-roading with a small car. I did get an error in an older OpenSim version with the script, and I recently found a bug in the script and created another version that is for owner-only, but that negates the usefulness of the “public” setting (which allows you to rez one for your friends and they can pilot it independently), however that is easy to change to owner-only setting. I’ll be posting a second version that is for owner-only in case of sim NPV jackers out there, lol. The public mode version allows others to pilot it, but I should add another “if” to check if someone is already sitting on it before granting permissions, because this seems to grab the controls away if others click and accept. This bug is not present in the owner-only mode version mainly because others cannot use it so it would be pointless. I might create a version within an “allow list” wrapper so only the listed people can use it.

    As a side note, many scripts do fail in the beginning, but determination and a desire to see it working as planned drives us to create better things. I routinely have things go wrong while building, such as testing vehicles that somehow end up flying in reverse or rotated 90 degrees, or the hand cannon that accidentally rezzed the pusher bullet 5 meters behind me and took me for a joyride across the sim. I actually enjoy these odd moments as they pull me out of the normality of “the box” and hurl me out into fun creativity.

    I also recently discovered I have become a bit rusty with prims since using Blender and making mesh things, so I decided to build linear and radial prim arrays yesterday as a refresher to stay sharp. Here are two pix of a random cyber library attachment I made as an exercise just for a refresher:

    The 5 layers rotate in opposite directions and use no scripts. Only the initial rotation script was required to initiate the rotation, so I saved a little on sim resources. ^,..,^

    Also, a friend had lost their net connection about a week ago and will be returning soon, so I am helping throw a party for her return. Here is a pic of me playing around with party ball rezzers that have random impulse & rotation at random times, random object color & random particle smoke color on rez:

    They go all squirrely and there is no way to try and guess what direction they will go each second or so. I should add my TrippehBox and a few laser lights for the party. For those that do not know, I made the TrippehBox to reduce lag while providing a neat party effect similar to those party ball attachments, except my TrippehBox uses 1 script, does not move, and can stretch from around 0.125 to 64.0 meters so everyone can enjoy using it at the same time without rezzing multiple items. Here’s a pic of the box:

    If I look sideways in that thing, I appear to have been pulled into some strange dimensional vortex. O.O

    Mick Scarbridge

    21 Jul 13 at 5:26 pm

  4. I really suck at scripting, as in I am barely able to edit them competently.

    Still, I dropped this in a couple of things (one was a two-prim “plane” I made to test another script I have, another was just a single prim).

    The two-prim plane distorted and its’ two prims seemed to “merge” together -I think that was actually the root prim turning invisible, come to think of it. It disappeared when I stepped off of it. I had the same thing happen with the single prim I tested (even though I edited it to full-glow). I tried finding them with Singularity’s area search feature and wasn’t able to.

    This was on a recent 0.7.6-dev installation, with ODE physics; I’m not sure what revision.

    Han Held

    21 Jul 13 at 10:06 pm

  5. Han,that’s right and supposed to work that way in the script:
    – The root prim turns invisible after seating (think poseball)
    – the vehicle automatically deletes itself after unseating

    Thus it is a great idea to tame your desire to drive or fly until after you took a copy of your vehicle into your inventory ^^

    To be honest, it’s written in the comment header…

    Orlando Frequency

    22 Jul 13 at 12:38 am

  6. lol, Han and i could be siblings! i can say that i often mess up when copy and pasting! so Han is actually a few notches above me! =)

    thanks Orlando on the explanation (reading comments in code? yikes, that would mean i actually look at each line!) *makes Ener’s head hurt* =D

    the huge plus for it deleting itself when getting out is that you don’t end up with vehicles all over the place if something goes wrong. i had this a lot when i tried doing a vehicle a year ago, they kept flying off and i’m sure i haven’t found them all (i don’t know how to look for stuff like that except to look at scripts under the land panel and that only shows some scripts . . .)

    thanks Mick for making this available and it’s a good point you make that this is under development BUT it’s a pretty well put together script! =)

    Ener Hax

    22 Jul 13 at 7:09 am

  7. LOL I got caught out -I’m horrible about reading headers too, Ener -as you can see. I thought I was getting better too. :(

    I’m just happy I can stop hunting high and low for the missing prims! :D

    **runs off to go read the header and think of what I can build with this**

    Han Held

    24 Jul 13 at 4:17 am

  8. Lolz. I like to make things more efficient for the user. Sometimes the unexpected happens when the details are overlooked, which is partly why I chose to make the script self-delete the object. This helps condition people to read the headers more. I also chose to make the root prim go transparent because it would look strange floating around with a box or beach ball between your ankles. It uses llSetAlpha(0.0,ALL_SIDES); instead of llSetLinkAlpha(LINK_SET,0.0,ALL_SIDES); because it was designed for use in a 1 prim object, but you can manually edit it to work with a multi-prim object like that. If you do not want the object to go transparent when sitting, comment out the llSetAlpha(0.0,ALL_SIDES); line in the code by adding “//” in front of it, like this:

    // llSetAlpha(0.0,ALL_SIDES);

    This will tell the compiler to ignore that line without touching the rest of the code, making it operate as usual but without going transparent. If you do not want the object to self-delete, than uncomment the llSleep(0.1); and llDie(); lines in the code, like this:

    // llSleep(0.1);
    // llDie();

    The reason to uncomment the llSleep(0.1); is because this pause of 1/10th of a second is no longer needed if the llDie(); line is not used.

    The license section can be overlooked but there are additional details in there that can help people with their own builds, such as describing why I like to set the properties to phantom or why I decided to use a certain texture. If more people use the techniques I used in that script, than more people will make builds that are efficient and lightweight on the server as well as the viewer.

    Sometimes things go really weird and I am forced to do an area search for things or hit CTRL+ALT+T to see if something went transparent. When things go missing, I look in my lost and found folder within inventory first to see if it was returned before I go searching the sim for it. This saves time and effort.

    I chose to make the NPV self-delete partly because many people tend to forget and leave things on other people’s sims when teleporting, or the logoff and leave things. Since this was a “public” variant of the NPV, it also prevents you from being killed in a combat sim only to have the other person run off with your vehicle. The primary reason was because I’m a little lazy myself and prefer letting the vehicle self-delete instead of manually selecting it and deleting it. :P

    If you read the entire script, even skipping the code parts, try to read the flavor text in there. I tend to comment little notes along the way that are not as boring for others to read, explaining why I added this line or what it does. Sometimes I comment out a line that looks very similar to one nearby, and it can be uncommented while the other can be commented out in its place to form a manual switch in the code that changes how the script works a little so it can be used for another purpose or in a different way. This can save a lot of time when the rest of the code is already written and tested.

    As an example:





    The “manual commented switch” above changes from making the object say “Blah!” in localchat (channel 0), to saying across the entire region on channel 12345. This helps scripts become a little more universal in application. Even the OpenSim.ini file uses “manual commented switches” for the settings, but that is not LSL code.

    Mick Scarbridge (SL).

    Mick Scarbridge

    24 Jul 13 at 3:03 pm

  9. PS:

    Driving the curled TV in my OpenSim was a lul using this script.

    Driving a house was a bit awkward as I could not see where I was going and the house went phantom so everyone inside would fall out.

    Driving a skybox seemed more feasible as long as you had a good view, so choosing what faces of what prims to make transparent while driving it would help while driving, and having them all return to normal after standing would be more efficient.

    I have tested this script with many objects, and have modified it a bit here and there for each application. That is the beauty of a GPL’d script. You can modify it for your application and if you choose to share your modded version, simply add what changes were made to the header under the Updates log, with your name or alias, and keep the rest of the header intact. One version of this script I made for an NPV that turns into a non phantom sky platform for building or chatting with a friend while standing high above the ground. If you add llSetPrimitiveParamsFast() or llSetLinkPrimitiveParamsFast() to the code after key events like standing or sitting, you can make the object turn into other objects, illuminate, or many other things at the same time. This is one of the script functions I use the most for my builds.

    Mick Scarbridge (SL).

    Mick Scarbridge

    24 Jul 13 at 3:30 pm

  10. wow, excellent code tips Mick! thank you!

    and massive LOL (lmaopimp) on driving houses around!!! =D

    Ener Hax

    25 Jul 13 at 6:51 am

  11. Driving houses around reminds me about Monty Pythons “The Meaning of Life”. There’s a movie about “The Crimson Permanent Assurance”:

    That might be a fun project for a region ;-)

    Orlando Frequency

    27 Jul 13 at 6:08 am

  12. XD I love watching Monty Python! Why not go for house racing? All that is left is to find a good voice actor for the announcer while the race is going, and you have a lulz situation.

    Mick Scarbridge (SL).

    Mick Scarbridge

    27 Jul 13 at 4:39 pm

  13. Yay! I can get a lot of scripts up and running, I will most definatly try out this one. TY lots ! (insert smiley emoticon here)

    chris haylerson

    2 Aug 13 at 8:08 pm

  14. cool, give a status report if it works for you and good luck! =)

    Ener Hax

    5 Aug 13 at 6:55 am

  15. Oh grief. >.<

    Anyone ever caught themselves trying to rotate the camera view in a pic of SL, IW, or OpenSim? I just did.. again.

    Mick Scarbridge (SL).

    Mick Scarbridge

    29 Sep 13 at 12:24 am

  16. lol, i do that all the time with just the freakin’ web!!! =D

    Ener Hax

    2 Oct 13 at 2:38 pm

leave a reply - add your thoughts

you can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>