Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Guided Tour scripts

JulieAnne Rau
Curious Girl
Join date: 21 Jun 2007
Posts: 201
03-17-2009 10:27
I'm thinking my next project would be a build a guided tour system. I want it to be a boat ride and I want it to cover a full SIM. So I was thinking about how to do this today. I have built a solar system before but basically its a ball on a large slowly spinning ring. I used a collision script so that when the plant touched the prim, it would say something cute :)

So, now I'm thinking that was only 1 prim. Now I need to use several prims and make it travel all over the place. Is the script different as it transfers from 1 prim to the other? Anyone have an example I can see?

Thanks, Julie
Tanith Rosenbaum
Registered User
Join date: 10 Sep 2008
Posts: 42
03-18-2009 10:00
From: JulieAnne Rau

So, now I'm thinking that was only 1 prim. Now I need to use several prims and make it travel all over the place. Is the script different as it transfers from 1 prim to the other?


As long as you keep all prims linked in a link set the script is no different. You just put your script inside the root prim and it moves all prims of the linked set as if they were one prim. Of course you have to account for different mass if you're making your ride physical.

Another option you have is to make it a vehicle, using the vehicle options. This simplifies handling the vehicle a great deal. There is an excellent introduction to that on the wiki.

Cheers
Tanith
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-18-2009 10:28
I have a greeter bot I'm working on (have been on and off for over a year!), and he can travel around an entire sim by following a predetermined set of waypoints. I haven't fully tested it out, but it can handle 50 waypoints or maybe more now. I've also had the basic movement portion on a vehicle testbed with some chairs and several avatars sitting on it, and it works just as well. It's setup so that you drag the object from position to position and click a waypoint button, and the unit remembers the locations and uses llMoveToTarget() to nudge the object from waypoint to waypoint. I get a fairly smooth transition by triggering the at_target() event earlier (about 1 meter before), and it even stores a waypoint when an avatar is detected, moves to the avatar, performs the greet, then returns to the point of detection and continues on its patrol. It might be difficult to script a decent control using a vehicle script as the vehicle functions are for manually driven vehicles. Using llMoveToTarget() gives you exact vector to vector control of the movement and has built in damping. One could script a hud or even run fully automated with pauses for loading/unloading of passengers, or a trigger the avatar touches to start the vehicle, however you'd want it can pretty easily be done.
_____________________
My tutes
http://www.youtube.com/johanlaurasia