I have a hobby of futzing small scripts together from time to time for my own purposes. I've always wanted to release these, but can't find the time/money/will to start a website around it, so I'm listing them here.
_____
This particular script is very simple. It enables an object to 'speak' as it were when clicked, and what it will say differs on whether the clicker is the object's owner or not. Nothing more. It'll come with Full Perms, so you'll be able to take a look and change what it says around to suit your needs. Keep in mind that the name it'll say it under is the actual Object's name.
I wanted to release this one because it actually took me a bit of time to figure this one out myself (in particular the part where it says something else when you're the owner) and found that nobody else had put this simple yet specific script together as an example for others to learn and figure out as well. I eventually figured it out, and I wanted to make it easier for others in the future.
The full code is available below for free, because, in the wise words of Joel Haver:
"Art should be in the hands of everyone. We shouldn't have to break our backs and our wallets and waste our lives to make it."
default
{
touch_start(integer total_number)
{
if ( llDetectedKey(0) == llGetOwner())
{
llSay(0, "Captain on Deck!");
}
else
{
llSay(0, "Visitor on Deck!");
}
}
}
You're free to purchase it still for 10L$, it'll come in a convenient script file so you won't have to bother with the annoyance of copy and pasting it yourself. The purchased one will include a couple // comments to make the already easy script even more easy to understand.
I consider every L$ purchase as a sort of donator's "thank you" in a sense, so by no means feel obligated to buy it. There's no licensing requirement, nothing of the sort. It's yours to do with as you please.
The code's right there, do something fun with it. And be well. <3
- Speaks out an llSay when you click it
- Differentiates between owner and non-owner
PERFECT!
What a simple, elegant script this is! Only a few lines of code, yet does exactly what is says on the tin. This was EXACTLY what I was looking for, perfect for inserting into modify perm 3D NPCs to create interactive Hosts that will give any necessary directions or instructions to visitors when interacted with. A well deserved 5 stars for a simple, elegant scripting job.