Rahscorch Posted January 5, 2020 Share Posted January 5, 2020 Hello I bought some simple animations (wave, laugh, finger-guns), with the intention of triggering them while I'm chatting ('hi / lol / pew-pew'). I learned how to make gestures but the lack of Transfer Perms prevent me. I dont understand permission restrictions. If I had the time & skill & inclination I'd try to make some hud (with 100++ anims & expressions ), but surely there's a more fluent way of triggering my anims/emotions with keywords whilst socialising? Someone had a similar issue in 2008 ...they solved the issue with a magic bracelet, because of course they did. Link to comment Share on other sites More sharing options...
OptimoMaximo Posted January 5, 2020 Share Posted January 5, 2020 (edited) 7 hours ago, Rahscorch said: Hello I bought some simple animations (wave, laugh, finger-guns), with the intention of triggering them while I'm chatting ('hi / lol / pew-pew'). I learned how to make gestures but the lack of Transfer Perms prevent me. I dont understand permission restrictions. If I had the time & skill & inclination I'd try to make some hud (with 100++ anims & expressions ), but surely there's a more fluent way of triggering my anims/emotions with keywords whilst socialising? Someone had a similar issue in 2008 ...they solved the issue with a magic bracelet, because of course they did. You can make a scripted avatar attachment that listens to you only, which triggers the animation you want based on keywords. Edit: this uses the listen event. The script should contain a permission request to play animations and only then start a to listen to you. Theisten event then shoukd contain filters to respond to you only, in a predefined channel if you so choose, and then a filter for the keywords you set up to play the correct animation(s) with optional sound and chat. I think a more indepth explanation can be asked in the scripting forum Edited January 5, 2020 by OptimoMaximo 2 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted January 5, 2020 Share Posted January 5, 2020 Here's the basic logic for playing animations based on keywords in local chat messages: default { // When the script starts: state_entry() { // Request permissions to animate the owner. llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } // When a permission request is answered: run_time_permissions(integer permissions) { // If permissions were granted: if (permissions) { // Listen for the owner's messages in local chat. llListen(0, "", llGetOwner(), ""); } } // When a message is heard: listen(integer channel, string name, key id, string message) { // Convert everything to lowercase so that case doesn't matter. message = llToLower(message); // Search for a keyword in the message. integer keyword = llSubStringIndex(message, "hi") // If the search didn't return an error, play an animation. if (keyword != -1) { llStartAnimation("wave"); } // Search for another keyword in the message. keyword = llSubStringIndex(message, "lol") if (keyword != -1) { llStartAnimation("laugh"); } } } It's not perfect as-is. If you just use llSubStringIndex to search for "lol" or "hi", the script will play an animation when you say "lollipop" or "hide". Checking for word-boundaries is slightly complicated, but not overwhelmingly difficult. 1 Link to comment Share on other sites More sharing options...
Rahscorch Posted January 5, 2020 Author Share Posted January 5, 2020 Thanks for the replies! Wulfie, you legend, that gives me something to work with, much appreciated 👍 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now