Simple airplane vehicle script
|
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
|
10-03-2005 11:59
If you can afford one more prim, the easiest would be to just add a prim, rotated the way it needs to be, and make sure you link it as root. Move the script into it, you can then hide it inside something if you really need.
(hint adding an invisible prim is easy, but a small thing you can do is make sure it's textured either a.) blank, or b.) a texture the client has already downloaded, ie. used in another of your prims, that's a small thing, but each bit of bandwidth you can save is good)
--lag nazi (client side or server side)
|
Badinage Odets
Registered User
Join date: 26 Sep 2005
Posts: 18
|
10-19-2005 14:59
Hello, first; thanks for the script, but I have a few questions. First is about scripts in general. How do I move them from here into the game? I cut and pasted into a script in the game, and it would never work, just act like theres no script at all. It wasn't until I got this exact script from someone in-game that it would work, even though i compared them and found them to be identicle. Next, I need to adjust the friction of the vehicle with the ground. I would think that the "Vehicle_linear_friction_timescale" would be the correct variable, but increasing and decreasing it by an order of magnitude dousn't produce a noticable effect. Next, the script defines all the user inputs in ways such as "Control_left, Control_Rot_Left". But how are these binded to keyboard keys? I would like to adjust the contols, swap some keys around. Any help would be much appreciated, thank you  Edit: He he, never mind for the most part, Ive been able to figure out most of the things I needed too. Now all I really want to know is, is it even possible to lower friction between a vehicle and the ground?
|
Badinage Odets
Registered User
Join date: 26 Sep 2005
Posts: 18
|
10-19-2005 15:01
hmm, my first reply dousn't seem to have made it, I hope this dousn't result in a double-post. Hello, first; thanks for the script, but I have a few questions. First is about scripts in general. How do I move them from here into the game? I cut and pasted into a script in the game, and it would never work, just act like theres no script at all. It wasn't until I got this exact script from someone in-game that it would work, even though i compared them and found them to be identicle. Next, I need to adjust the friction of the vehicle with the ground. I would think that the "Vehicle_linear_friction_timescale" would be the correct variable, but increasing and decreasing it by an order of magnitude dousn't produce a noticable effect. Next, the script defines all the user inputs in ways such as "Control_left, Control_Rot_Left". But how are these binded to keyboard keys? I would like to adjust the contols, swap some keys around. Any help would be much appreciated, thank you 
|
Badinage Odets
Registered User
Join date: 26 Sep 2005
Posts: 18
|
10-19-2005 18:47
helllo
|
Cubey Terra
Aircraft Builder
Join date: 6 Sep 2003
Posts: 1,725
|
10-21-2005 15:12
First, take a look at www.secondlife.com/badgeo for script examples and tips. Next... From: Badinage Odets First is about scripts in general. How do I move them from here into the game? I cut and pasted into a script in the game, and it would never work, just act like theres no script at all. Scripts are just plain text, so you can just copy and past into an object's script. Here's how you paste a script: 1. Right-click the object, choose Edit, click Content. 2. Click New Script. 3. In the new script's editor, paste the script text that you copied. Make sure there are no extraneous characters or formatting, or it won't compile. 4. Click Save. If the syntax is correct, it will compile and save. From: someone Next, I need to adjust the friction of the vehicle with the ground. I would think that the "Vehicle_linear_friction_timescale" would be the correct variable, but increasing and decreasing it by an order of magnitude dousn't produce a noticable effect. As far as I know, you can't adjust ground friction b/c there doesn't seem to be any in SL. Adjusting VEHICLE_LINEAR_FRICTION_TIMESCALE will change the friction regardless of what it's touching. If you wanted to get more complex with your airplane (I'm assuming that you're making a plane) you could change the friction timescale when the plane is within x meters of the ground. That would require a timer to check the altitude regularly, and may be more complex than you want to attempt at this point. From: someone Next, the script defines all the user inputs in ways such as "Control_left, Control_Rot_Left". But how are these binded to keyboard keys? I would like to adjust the contols, swap some keys around. There are only 10 controls you can take, unfortunately, and they matched to specific keys on the keyboard (and mouse), as described in the LSL Wiki: http://secondlife.com/badgeo/wakka.php?wakka=llTakeControlsIt would be very nice if LL gave us a couple more keys to use (are you reading this LL?). 
_____________________
C U B E Y · T E R R A planes · helicopters · blimps · balloons · skydiving · submarines Available at Abbotts Aerodrome and XstreetSL.com 
|
Ares Solzhenitsyn
Weirdo.
Join date: 19 Oct 2005
Posts: 2
|
10-21-2005 19:30
From: Badinage Odets Hello, first; thanks for the script, but I have a few questions. First is about scripts in general. How do I move them from here into the game? I cut and pasted into a script in the game, and it would never work, just act like theres no script at all. It wasn't until I got this exact script from someone in-game that it would work, even though i compared them and found them to be identicle. Next, I need to adjust the friction of the vehicle with the ground. I would think that the "Vehicle_linear_friction_timescale" would be the correct variable, but increasing and decreasing it by an order of magnitude dousn't produce a noticable effect. Next, the script defines all the user inputs in ways such as "Control_left, Control_Rot_Left". But how are these binded to keyboard keys? I would like to adjust the contols, swap some keys around. Any help would be much appreciated, thank you  W00t. This is my first post. Anyway, the answer to your first question is, in the item edit menu you have to hit more, the content- and drag the script into that folder.
|
Dest Boyoma
Registered User
Join date: 16 Oct 2005
Posts: 8
|
10-21-2005 21:05
I created a plane which is bascially a cross, linked the two parts, and put this script into it. When I press arrow keys in sit, it just moves the camera around :/
|
Flugelhorn McHenry
Valved bugle
Join date: 10 Jul 2004
Posts: 34
|
10-24-2005 13:26
From: Badinage Odets Hello, first; thanks for the script, but I have a few questions.
First is about scripts in general. How do I move them from here into the game? I cut and pasted into a script in the game, and it would never work, just act like theres no script at all. It wasn't until I got this exact script from someone in-game that it would work, even though i compared them and found them to be identicle.
I'm only addressing your first point because I don't have enough experience of vehicle scripting to answer the others confidently without noodling around, which isn't possible at the moment because all but non-staff are locked out. What exactly are you doing when you're trying to copy a script from the forum and paste it into SL? If you take any script which is supposed to work in a single prim, copy it, then create a new prim, edit the properties of that prim and create a new script within it, then paste the copied script into it and compile the script, it should work. Having said that, I have had some problems in the past with scripts taken from the scripting library because some scripts seem to have been improperly copied into the forum postings (e.g. omitting vital line breaks). If you're still having problems and no one else has come to your aid, message me in world and I'll try to help.
|
Ben Stravinsky
Second Life Resident
Join date: 7 Nov 2004
Posts: 149
|
^^
10-31-2005 06:26
wowza, what an interesting read ^^....... i know 10 times more than i did before reading this!
Now i have my question lol.... How would i go about putting a custom pose in for the pilot, and maybe also for a passenger? For example, a peddle plane would need a cycling animation. I shouold imagine thats more than possible no?
Thanks a bunch ^^
|
Kage Seraph
I Dig Giant Mecha
Join date: 3 Nov 2004
Posts: 513
|
01-20-2006 07:32
llStopAnimation("motorcycle_sit"); } }
}
run_time_permissions(integer perm) { if (perm) { llStartAnimation("motorcycle_sit"); llTakeControls(gAngularControls | gLinearControls, TRUE, FALSE); } }
You'd mod the two instances of "motorcycle_sit" to the name of an animation you stuff into the same prim that contains this script. For the passenger, you'd essentially want a stripped-down poseball script in the prim that the passenger will be riding. Crystalshard Foo has previously posted an open-source poseball that you could chop much out of. Also, Cubey Terra's variable lift plane script in this forum is good stuff. Check that out too.
|
Max Demar
Registered User
Join date: 1 Mar 2006
Posts: 50
|
Can anyone post a "hovercraft" script
07-30-2006 14:54
I'm looking for a hovercraft script. I know nothing about scripting, and while I've seen mention of using a hoverboard script thats free and floating around SL, but needs tweaking, I"m unable to "tweak". (NOT a mouselook steering script please)
Anyone willing to post this script or IM me on or offline please?
Max Demar
|