Ms Kitty
SL Explorer/Shopaholic
Join date: 26 Dec 2004
Posts: 24
|
05-24-2005 09:00
My partner, Dark Chatnoir and myself are working on a rideable sailing vehicle for visitors to use themselves to ride around our island. Is there a script available that allows multi-users who can ride an object without buying the item themselves? We would appreciate any assistance with this -- please contact myself or Dark Chatnoir (who is doing the scripting part) inworld. Thanks so much for any help  Ms Kitty
|
Luke Ramona
Registered User
Join date: 3 Apr 2005
Posts: 32
|
05-24-2005 09:56
The only thing that prevents people from driving most vehicles is a check to see if the person that sat in the Driver's Seat (Link 0/Parent Prim) is the Owner of the object. To get around this for your boats, just don't use that check (if statement). default { state_entry() { llSitTarget(<0, 0, 0.1>, ZERO_ROTATION); // needed for llAvatarOnSitTarget to work } changed(integer change) { // something changed if (change & CHANGED_LINK) // and it was a link change { llSleep(0.5); // llUnSit works better with this delay if ( llAvatarOnSitTarget() != llGetOwner() ) // The avatar sitting on the object is not the owner { llSay(0, "Get off!"); llUnSit(llAvatarOnSitTarget()); // unsit avatar } } } }
This is how, I assume, most vehicles have been set up to prevent people from using the vehicles if they are not the owner. Basically all you need to do is not Unsit the avatar. You may still want to detect whether an avatar has sat on the vehicle (to start the engine so-to-speak) but that doesn't mean you have to eject them if they are not the owner of the vehicle.
|
Ms Kitty
SL Explorer/Shopaholic
Join date: 26 Dec 2004
Posts: 24
|
05-24-2005 11:21
Thanks so much Luke -- sounds reasonable to me who knows nothing of scripting will pass it on to Dark -- Thanks again
Kitty
|