So, in this case, else already means "if(playing = TRUE)", so there is no need to specify it again. No need to write it if(playing = FALSE)īecause "else" already means that whatever condition is in if is not true. LlRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION) Īnd a general recommendation.
So, the working code is //specify the key of the agent that you want to be the 'TOUCHER' To make only the 'toucher' be "heard" by the touch event, simply put whatever there is in it into if(llDetectedKey(0) = TOUCHER) statement. But you want only the wearer to be animated, so you need to use llGetOwner() instead, because the wearer is always the owner of the object. So, your variant can be used as a dance machine that is attached to someone. That means that, no matter whether this object is worn by somebody or not, it will ask permission to animate from a toucher, not a wearer. One error you've made is that you ask for permission to animate from one who touched the object. If I implement a permission system, how would I do that? Where in the code should I put it? Also, if I wanted the object to say or whisper something when clicked by the permitted person, how can I do that? I am also open to being directed to alternative scripts that get closer to what I want, if available and preferably modifiable. LlStartAnimation(llGetInventoryName(INVENTORY_ANIMATION,0)) LlStopAnimation(llGetInventoryName(INVENTORY_ANIMATION,0))
LlRequestPermissions(llDetectedKey(0),PERMISSION_TRIGGER_ANIMATION) Here's the script I currently have: integer playing In this case, I am not finding solutions. I have effectively no scripting experience so I just find scripts others made or haphazardly tinker. I already have a script which animates on touch but now I need to implement some kind of permission system. When clicked a second time, the animation stops. I would like to create an object that, when clicked by a specific person and only that person, it will animate the wearer of the object.