SaraCarena Posted December 22, 2013 Share Posted December 22, 2013 Hi, I`m new to scripting and have searched sl wiki on how to solve this but the jargon`s a bit techy for me.Working on a missile that pushes an avatar and says a message when it hits which is working fine, avatar gets pushed, message says "xxx was hit by xxx".The problem is that if the missile misses the intended avatar it generates the message about any prim that it does hit, which I`d rather not have. Obviously I`m only interested in the message showing when an av is hit but can`t figure how to stop message showing when it hits any old random prim.code I`m using is: llOwnerSay(llDetectedName(0) + " is hit by slushy snowball");I understand that llDetectedName() can apply to av`s and prims but can`t figure how to just apply it to av`s.Thanks in advance for any help Link to comment Share on other sites More sharing options...
nuBko1 Posted December 22, 2013 Share Posted December 22, 2013 do not worry everything will Link to comment Share on other sites More sharing options...
Niall Braveheart Posted December 22, 2013 Share Posted December 22, 2013 You could use llDetectedType to determine whether the object collided with an Avatar or Object http://wiki.secondlife.com/wiki/LlDetectedType if (llDetectedType(0) & AGENT_BY_LEGACY_NAME) { llOwnerSay(llDetectedName(0) + " is hit by slushy snowball"); } Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 22, 2013 Share Posted December 22, 2013 Please, for the sake of people like me who get so annoyed when scripts talk about "so and so Resident," use llDetectedName(0), like this if (llDetectedType(0) & AGENT_BY_LEGACY_NAME){ llOwnerSay(llGetDisplayName(llDetectedKey(0))+" is hit by a slushy snowball");//nb correction } Link to comment Share on other sites More sharing options...
Perrie Juran Posted December 22, 2013 Share Posted December 22, 2013 Maybe you could program it to say when it misses, "Ha Ha, you can't throw to save your life." (I did think of some other insults but decided I'd get my ass zinged if I posted them). Link to comment Share on other sites More sharing options...
SaraCarena Posted December 22, 2013 Author Share Posted December 22, 2013 Works perfectly thank you and helped me understand a little bit more about lsl. How apt that you sell chrimbo cards too! Link to comment Share on other sites More sharing options...
SaraCarena Posted December 22, 2013 Author Share Posted December 22, 2013 umm..thanks was to Neil coz I missed the other posts but thanks to you Innula I will sooo try to avoid the "resident" bit, does annoy me too. VERY funny Perrie!!, certainly an idea Link to comment Share on other sites More sharing options...
Innula Zenovka Posted December 22, 2013 Share Posted December 22, 2013 Eeep.. I made a horrible mistake.. please see my corrected version Link to comment Share on other sites More sharing options...
SaraCarena Posted December 22, 2013 Author Share Posted December 22, 2013 Just tuts at Innula...too many christmas spirits ..eh?....thanks though, beginning to see how lsl functions/thingies stack up to achieve more complex....ummm...thingies Link to comment Share on other sites More sharing options...
Perrie Juran Posted December 22, 2013 Share Posted December 22, 2013 SaraCarena wrote: umm..thanks was to Neil coz I missed the other posts but thanks to you Innula I will sooo try to avoid the "resident" bit, does annoy me too. VERY funny Perrie!!, certainly an idea When I was a kid learning to play baseball the common insult was, "You throw like a girl." I don't think that would be very acceptable today. Link to comment Share on other sites More sharing options...
SaraCarena Posted December 23, 2013 Author Share Posted December 23, 2013 Well Perrie, some girls can`t catch......or sing! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now