Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Owner-only use

Erik Bligh
Registered User
Join date: 25 Feb 2006
Posts: 27
02-27-2007 19:18
Hey guys, does someone know a source where I can find out how to get a script to work only for its owner? If not, could someone walk me through how to do it? You guys all rock, thanks
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
02-27-2007 19:36
Generally, a script "works" when someone touches it. To limit touches to the owner use:
if (llDetectedKey(0) == llGetOwner()) { do what you do }

To limit chat commands to the owner, use the llGetOwner() filter for the eky in llListen:
llListen(1, "", llGetOwner(), "";); // listens to owner on channel 1

You can use similar techniques for the collision filter and events. llGetOwner() is the key.