Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Balloon Vehicle Script?

Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
03-06-2006 04:35
I have a task in mind that will be my first attempt at making a 'vehicle' in SL, and I need a little help, please.

I'm doing RP with several friends as a race of winged foxes. For some of our RP, we need to be able to have two avatars slowly rise verticaly into the air together, while each are performing a flight animation. It's essentially an aerial mating dance. :rolleyes: They should appear to fly up into the air together, rise out of sight of those on the ground, and then descend back down a while later.

I thnk that what I need to do for that is to make an invisible platform with two suitable pose balls attached, and have that platform be a vehicle that can rise under control of one of the pair, like a ballooon vehicle, but using the pose balls instead of 'sit in the vehicle seat' scripts.

Or maybe I need some sort of 'sit elevator' script instead? It only needs to slowly rise straight up, and then sink back down later to the same spot where it started. It doesn't need to move around, bank, or do other vehicle behaviors.

I looked up vehicles in the scripting WIKI, and found some code relating to a balloon type vehicle. But I have no clue as to where to go from there. I couldn't figure out how to make it work or how to control it once it was made.

Any help or advice would be appreciated. Thank you.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
03-06-2006 06:56
Personally speaking I'd do it as a variation on a physical object like an elevator. It might be as simple as a pair of sit balls that play the dance with llSetBuoyancy calls on a timer so they float upwards for known time and then float downwards.

That would certainly be my starting point anyway. If you want a really solid poseball script Strife Onizuka has posted one on this forum (sorry, this damned browser is down to one window again, so you'll have to do the search). Amending that with the floating up and down behaviour is probably quite easy, and hopefully easy to tinker to get the timings right too.

Good luck!
Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
03-07-2006 08:54
Doesn't anyone have just a basic hot air balloon script that I could examine as a starting point? The closest thing I have found so far is a script for a flying car. But I only need to have this vehicle capable of flying up or down, and maybe rotating on the vertical axis.

As I understand it so far, the 'pilot' of a vehicle sits in it first, and ends up in a designated sit pose. Then the 'passenger' sits, and also gets a sit pose. At that point, until the pilot unsits, his/her motion controls will act to control the vehicle.

But what I don't understand how to do is how to have both the pilot and the passenger each seated on an existing pose ball, or at least playing the script from said pose ball, which would be linked to the vehicle, instead of sitting on the root prim. Would I need a third, somehow invisible player to pilot it for us?

What I really want is for the couple to embrace each other, and then appear to fly up into the air together, while performing the animation from the pose ball set that we selected. The pose ball set works fine on the ground. We just need to add the vertical lift factor, by some method more elegant than placing the pose ball set and slowly editing the height of them to rise and then descend again.
Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
03-08-2006 06:26
I have been given a couple of balloon vehicles in-world that I can examine and most likely modify. I'm not on the computer that I play SL on at the moment, so I can't dig up their name yet to thank them properly. I'll post a thank you to them here later.

For now, my benefactor has my gratitude. If this works, you will have helped to make my mate and I quite happy!
Navicerts Pickles
Registered User
Join date: 7 Mar 2006
Posts: 3
03-09-2006 12:38
This will make you "float up", change the .1 to a larger number for a faster climb. I guess it's just a place to start for you, good luck.


float mass = llGetMass() + .1;
float gravity = 9.8;
llSetForce(mass * <0,0,gravity>, FALSE);
Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
03-13-2006 06:49
I was given a "Clowning around Balloon Ride" vehicle, which is designed to make it look like you're dangling from a cluster of balloons.

I was able to successfully re-use and alter the script from that to make a disc-shaped meditation mat, which uses the 'floating-meditation' pose for the pilot, hovering over the mat. You can then fly in that pose, with the mat hovering under you like a flying carpet. Pretty cool! I just need to figure out how to make it bank less when I turn. It banks far too much now.

A few odd glitches...

One time, I landed the vehicle, released the controls to get off, and when I looked for the vehicle, it was gone. I didn't see another copy in my inventory anywhere, but it may have returned to me and I didn't realize it. I even turned off rendering the ground, to ensure it wasn't below the surface...

Another time, I rezzed the vehicle on a sloping surface, and when I trier to rise, I tilted instead and couldn't go up. When I stood up it tried to tip again and slip into the ground...

Finally, I did a flight with it, and landed on a flat space of land. When I stood up, it started to slowly rise on it's own until I took it back into inventory.
Static Sprocket
Registered User
Join date: 10 Feb 2006
Posts: 157
03-13-2006 09:15
Sound vaguely like buoyancy has been set to something other then zero, basically make the object weightless. Thus when you get up, your AV may impart some force on it -- and it'll just float away.

May want to make sure that it turns off physics when you are unseated.
Starchaser Webb
Artist / Builder
Join date: 23 Feb 2006
Posts: 30
03-13-2006 11:25
Hmmmm. The one that went missing reappeared on the ground roughly where I would have expected it, the next time I logged in and went to that area. Perhaps it had been there but didn't rez, or perhaps it floated up and drifted back down...

I adjusted a few settings, and now it behaves well as a flying platform. The only time that it tipped on me was when I accidentally ran it into a physical ledge while rising. And it righted itself shortly after that.

Now to get it to work with a passenger, and with the animations I want to use...