Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Does anyone have a script that will make an object say something when sat on?

Opeo Bluebird
Registered User
Join date: 28 Jul 2009
Posts: 15
10-09-2009 19:28
Please, could i have it? :D
Copy and paste it here if you could
Rhonda Huntress
Kitteh Herder
Join date: 21 Dec 2008
Posts: 1,823
10-09-2009 21:04
From: LSLWIKI
default {
state_entry() {
llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION); // needed for llAvatarOnSitTarget to work
// Note that if both the vector and the rotation are zero,
// the SitTarget is removed instead of set and the following will not 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() != NULL_KEY) { // somebody is sitting on me
llSay(0, "Get off!";);
llUnSit(llAvatarOnSitTarget()); // unsit him or her
}
}
}
}


Link to page:
Scylla Rhiadra
Gentle is Human
Join date: 11 Oct 2008
Posts: 4,427
10-09-2009 21:11
From: Rhonda Huntress
Link to page:

Rhonda, you are a star! I have no idea how I'd use a script like this (maybe to tell people not to sit on my books???), but it's amazing how quickly you found this.

*sigh*

I wish I could script . . . :(
_____________________
Scylla Rhiadra
Rhonda Huntress
Kitteh Herder
Join date: 21 Dec 2008
Posts: 1,823
10-09-2009 21:21
I R A nerd :cool:
Opeo Bluebird
Registered User
Join date: 28 Jul 2009
Posts: 15
10-09-2009 21:34
Thanks Rhonda!~

and Scylla, all you have to do is edit the object you would like to script, go to content and click new script button, paste one in the text box. for this one, you would change the part where it says: "Get off" to whatever you want the object to say

I can't script either but copy and pasting is good enough for now XD