Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2007 07:19
(Do not ask what happened to version 4. Just. Don't.)
[Edit]Woops, corrected a silly bug in "main", that would make your build turn 45 degrees when piloting it for the first time. [Edit2] Corrected a bug where your vehicle would flip around the North-South axis if parked facing South. [Edit3] Added a feature: say "/129 s" to make the parts forget their relative positions and rotations (sit in the pilot seat once to make them recalculate position and rotation when you're done adjusting), and say "/129 k" to delete the whole build in one go.
Directions:
Put eight copies of the "move" script, properly numbered from 0 to 7, in the root prim of each of the linksets that compose your multiple-object vehicle.
Then put the "main" script in the control seat of your multiple-object vehicle, which must be a child prim. Please note that your vehicle will rotate around the root prim of the object containing that seat !
That's all. You may want to take the whole thing into your inventory by selecting every object, waiting for the "link" command to be enabled again (which is a sign that your selection is acknowledged entirely by the simulator, this might take up to a whole minute if your build is very complex. If you don't wait, you may be missing parts of it) then Taking it.
Important:
If you plan on making multiple different large vehicles, you MUST change the value of "offchan" between different builds, and change it by more than 9, or else you will not be able to use more than one at a time near within 100m of the other.
What's new ?
This version introduces modern camera handling: the view will switch between various points of view depending on the direction where you are moving your large vehicle. The script here supports 5 different cameras: one normal, forward-looking camera from the back of the vehicle, another looking down when you strafe, one looking up when you go down, one looking from the side when you go up, and one looking back when you move backwards. Change them to suit your needs.
This version also introduces banking in turns, and tilting when accelerating. If you don't want those, you may want to rework a bit the timer() function to simplify the rotation calculation part and make it run slightly faster. Basically, by default the vehicle banks about 10 degrees in turns at full speed, and tilts 5 degrees or so forward or aft when accelerating or decelerating.
Included in this version: a decentralised method for generating channels for all the objects to sync on, which eliminates the probability of your vehicle and someone else's fusing together when close.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
|
10-25-2007 07:43
What happend to v4 XD only jking, great work as usual i finaly have soming todo today 
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2007 08:17
Zounds. I think this ought to have gone in Scripting Library instead...
Anyway. Version 4 as supposed to include some mouselook steering capability excerpted from nonphy, and, well, let's just say some experiments went wrong, some demons got loose, and some sanity was lost in the process.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-27-2007 04:36
Corrected one weird bug (llAngleBetween might be buggy ? Or it claps values in a strange way).
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Ryder Spearmann
Early Adopter
Join date: 1 May 2006
Posts: 216
|
10-27-2007 12:34
OMG, work is being done on multimove??? Awesome I looked into it back in the day... a little too frustrating :/ Will have to give it a try  Best of luck!
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
10-28-2007 18:02
It may be worth an attempt at writing multimove the same style that the nonphys is written; instead of chatting, you can have each of the parts check the main object's description using llGetObjectDetails to retrieve a vector and rotation. If it's built or set up properly, it may be able to instead use the position and rotation values directly as well.
|
Land Control
Alternate Personality
Join date: 5 Sep 2005
Posts: 9
|
10-31-2007 00:49
An object can't change another object's description.
Or do you suggest using the new llGetObjectDetails so that other parts read the position in a continuous loop ? That could work in the same region, requiring a script in each part to reset those on demand (when movement stops or wbhen rerezzed). But it wouldn't allow sim-border crossing.
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
10-31-2007 06:18
From: Land Control An object can't change another object's description.
Or do you suggest using the new llGetObjectDetails so that other parts read the position in a continuous loop ? That could work in the same region, requiring a script in each part to reset those on demand (when movement stops or wbhen rerezzed). But it wouldn't allow sim-border crossing. If they're done so that they follow their owner's key rather than the object the owner is sitting on, then it should work for crossing borders. 
|
Land Control
Alternate Personality
Join date: 5 Sep 2005
Posts: 9
|
11-03-2007 04:11
Unfortunately, an avatar's position is not reliable enough to sync multiple objects in mouvement like that, too often there are weird warping issues, absurd teleporting to <0,0,0> upon sim border crossing. Additionnally, it would mean the object that the avatars is sitting on would move first, and only then would the other objects follow. That's not acceptable. So chat remains the only method.
|