Jump to content

Swimmie Chaffe

Resident
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Swimmie Chaffe

  1. Thanks Ivanova, Ojiro and Rolig for your replies! I can have a script read a list from a NC, but when I do that, a list on the NC replaces the original list. What I am trying to do is to retain the original generic list (option 1, option 2 etc), so that I can use option 1, option 2 etc, as global variables. I'll study Wikis you shared more closely. Thanks again!
  2. Greetings, I am wondering if there is any way to read llDialog list from a notecard, but read a list only as labels and keep associated actions static. What I am hoping to accomplish is to have a line such as below in a script: list MENU = ['option 1," "option 2", "option 3", "option 4"]; and substitute these generic "option 1" ... list with more meaningful labels read from a notecard. In the end, I would like to be able to prompt an action using the original list -- e.g., if an avatar chooses option 1, no matter what label it may be associated with, will prompt the same action that is associated with option 1. Is it possible to do this? If so, how shall I set up a script and notecard? Your advise will be appreciated. Thanks in advance! Swimmie
  3. Hi, I want to write a script that will find a match from a group of letters. Let's say I create five groups based on the first letter of avatar's name, and have a prim announce which group an avatar belongs to when an avatar touches it. Here are my five groups. Group 1 = Initial A-G, Group 2 = Initial H-N, Group 3 = Initial O-U, Group 4 = V-Z, Group 5 = Numbers I know how to make one-by-one comparison to find a match, but don't know how to do one-to-many comparison. I am guessing maybe I can doing using List, but I don't quite get how to work it out... If anyone can point me to a good reference, I'd really appreciate it. Thank you!
  4. Hi, I want to write a script that will find a match from a group of letters. Let's say I create five groups based on the first letter of avatar's name, and have a prim announce which group an avatar belongs to when an avatar touches it. Here are my five groups. Group 1 = Initial A-G, Group 2 = Initial H-N, Group 3 = Initial O-U, Group 4 = V-Z, Group 5 = Numbers I know how to make one-by-one comparison to find a match, but don't know how to do one-to-many comparison. I am guessing maybe I can doing using List, but I don't quite get how to work it out... If anyone can point me to a good reference, I'd really appreciate it. Thank you!
  5. And no - you did not scare me - it's just I was not able to access to this forum to check your response for a while :-) I don't pretend I understand everything that has been said, though -- but I hope I'll understand all after some learning! Thanks again! matte-motes-bashful-cute-2:
  6. Qie, LepreKhaun, Jenny -- thank you so very much! It's great to know there are multiple options. I'll go in-world and try each option later tonight, if we still power here (under blizzard warning tonight)!
  7. Qie, LepreKhaun, thank you very much for your suggestions! And yes, you are right, the intended outcome should be: Swimmie Chaffe: hbjd Sorry for my sloppiness. Qie, I was not familiar with llParseString2List, so I looked it up, and it seems that's just the function I need. I've been looking up Wiki and stuff, but feel a bit confused. Would you please explain your example llParseString2List(instring, ["[", "]"], []) a bit? I understand "[" and "]" mean that they will serve as a separator, but what does [] mean? I saw it in another example too, but could not get what it does. Say I have: originalmsg= what is said in a babbler channel newmsg = what a babbler spits out (i.e., scrambled words) code = the encoding system (list) oldchar = a character in the original message newchar = a character in the new message pos=a position of a new character in the encoding system string oldchar=llGetSubString(originalmsg,n,n); string newchar=llList2String(code,pos); newmsg +=newchar; If I insert llParseString2List(orignalmsg, ["[", "]"], []) in this script (before the second line, I guess?), and says " am not quite sure [what] I am doing," it would produce "I" and "what"? If so, I wonder how I can incorporate them in the scrambled sentence in a right order. LepreKhaun, I think I see the logic of your variable method, but not quite sure how to code to switch back and forth between two systems by using a particular character ([ and ]) as an indicator. Any reference you suggest me to look up? Thank you again for your help, and sorry if I am asking too noob questions...
  8. Hi, I made a babbler/scrambler that jumbles up words said in a certain channel. Basically, the script replaces a character in a convo with another using a list, and makes an incomprehensible list of letters. For instance, a babbler channel = 1 Code = a=h b=i c=j d=k If I type: /1 abcd in a chat, it'd show Swimmie Chaffe: hijk Now I am trying to include an exeption rule in this, so that words in a bracket would be excluded from scrambling, but not sure how to code it... what I want to accomplish is, using the same code: If I type: /1 a[b]c[d] in a chat, Swimmie Chaffe: hajd I've been thinking what would be a good way to tell the script "if words are within [ ], use the original letters", but cannot find how to translate it in the language a script would understand. I'd appreciate if anyone has any suggestion!
  9. Ela, Dora, Qie - thank you very much! Qie, thank you so, so much for the example. I'll have to spend some time studying it, but I think I am following the logic of the script alright. Your help is much appreciated!
  10. Hi Qie, thanks for your reply. How can we move an avatar and one child prim using llSetLinkPrimitive ParamsFast? I looked up Wiki but could not tell...if you know a good online reference, would you kindly point me to?
  11. Hi Dora, thanks for your reply. So, do you think the only way to move an avatar along with a child prim would be move them separately -- a prim with llSetLocalPos and an avatar via llSitTarget? I would like to have an avatar-sat child prim float around (not Omega rotation) a root prim, and wonder if moving a prim and an avatar separately create a lag between movements of the two. If you have any advice, I'd love to hear!
  12. I am wondering how I can move a child prim by script along with an avatar sitting on it. I noticed that with a usual poseball script, if I change a position of a child prim with script after an avatar sits on it, the avatar stays in its original position. How can I script so that when a child prim's position changes, an avatar also moves with it? If anyone can point me to an example script, I'd very much appreciate it!
  13. Hi Innula, Yes, I changed the code. I tried it in another sim, and now it is working!! I think it was a lag problem or something of that sort. Thanks again, and a lot, for your help!
  14. Hi Innula, Thanks. I tried it again, and even though I did not change anything, it listens to the key now --- maybe it was an SL issue earlier. However, the follower prim still stay where it rezzes, instead of following the target avatar. I'll give it a break then try it again, maybe it will work then... Thanks again for all your help!
  15. Hi Innula, Thanks for your suggestions. I changed my target == (key) message to my_target = (key)message, but the script silently fails at this code. I inserted llOwnerSay(message) right after this, and the prim does not repeat the message. When deactivate this code, it does. So I guess this code somehow stops the script. Any thoughts?
  16. Hi, I would like to make a "follower" prim that is rezzed and activated by a "trigger" prim. When an avatar touches the trigger, it rezzes a follower prim and pass the key of the avatar to the follower so that it can follow the toucher. I wrote the following script for the follower, but the follower prim would not move to the avatar :-( . I know it is listening to the correct avatar key, so I guess the problem is converting an avatar key in the message into an appropriate format. I'd appreciate if anyone can point out what I am doing wrong and how to fix the problem. Thank you in advance, Swimmie ------------------------------------------------------------------------------------- integer key_channel = -1; key my_target; vector offset = < 0.1, 0, 0.5>; default { on_rez(integer start_param) { llResetScript(); } state_entry() { //Listening llListen(key_channel, "", "", "" ); } //Trigger listen(integer channel, string name, key id, string message) { //Follow the target if ( channel == key_channel ) { my_target == (key)message; llSetStatus(STATUS_PHYSICS, TRUE); llSleep(0.1); llSetTimerEvent(1.0); } } // Positioning the object to follow the target timer() { list det = (list)my_target; vector pos = llList2Vector(det,0); rotation rot = (rotation)llList2String(det,1); vector worldOffset = offset; vector avOffset = offset * rot; pos += avOffset; llMoveToTarget(pos,0.4); } }
  17. Greetings scripters, I would like to make a chair an avatar can sit only once a day, but am not sure where to start. I understand I will need to use a timer, but do not know how to make a timer avatar-specific, or how to make a prim to remember and identify who already sat within 24 hrs, and to forget about them after 24 hrs. I'd appreciate if you could suggest an example that I can model after. Thanks, Swimmie
  18. Thanks Darkie! Getting the owner's location is the part I was not sure how to do. I am thinking to use a HUD for a "caller" prim. Can a distant prim (prim 2) get the owner's position (who wear's the HUD) by requesting llGetObjectDetails of the HUD?
  19. Hi, I am wondering if it is possible to script a prim so that it would locate and move to the owner when the owner calls it using llRegionSay. I'd appreciate if anyone could advise if it is do-able, and if it is, what would be an efficient way to script it. Thanks! Swimmie
  20. Greeting Rolig, just wanted to thank you for sharing this wonderful scirpt. I had been struggling with a whitelist for quite a while, and finally could write a script I wanted by working from your codes. Your generous guidance is much appreciated!
  21. Oops! Yes, that was it...now it is reading the NC. Thank you very much! :-)
×
×
  • Create New...