Jump to content

Rubberene

Resident
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Rubberene

  • Rank
    Member
  1. I have a product I sell which consists of a HUD and an attachment. Two scripts. 0.06069 ms script time. I have sold nearly 700 of them since I first listed them last May. The vast majority of people who buy them have no trouble, but occasionally I get a message from someone who says it "stopped working." I think so far I have gotten this message about six times. Inevitably I find that they are wearing a ton or three of scripts, for example: [12:39] Script info: '*Anonymous* Resident': [336/376] running scripts, 20988 KB allowed memory size limit, 1.193797 ms of CPU time consumed. In the case of this person, during the conversation I suggested several times that they take off some scripts, but they ignored this and insisted all they needed was a replacement "that worked." Furthermore, they insisted I give replacements to three of their friends, apparently just in case. I did all this, of course, but told them if they kept wearing so many scripts, the new ones would probably stop working for them before long. So far they are apparently happy. Fingers crossed. I know from dealing with some of the others that when they get rid of all the unnecessary scripts, my product "magically" starts working again. What I would like to know, though, is why this happens. Is there some priority given to scripts based on script time, or something else? I think if I understood the reason this happens, I might be able to explain it to my customers in a way that would convince them that so many scripts are not a good idea. All the other reasons a gajillion scripts are a bad idea aside, of course. :)
  2. Wow, really? I would have sworn this has worked for me in the past. I guess I could be wrong.
  3. I am trying to make the textures rotate on sides 0,1&3 of a cube. I put the following script in it to do so: default { state_entry() { llSetTextureAnim(ANIM_ON | SMOOTH | ROTATE | LOOP, 0,1,1,0, TWO_PI, -PI); llSetTextureAnim(ANIM_ON | SMOOTH | ROTATE | LOOP, 1,1,1,0, TWO_PI, -PI); llSetTextureAnim(ANIM_ON | SMOOTH | ROTATE | LOOP, 3,1,1,0, TWO_PI, -PI); } } Result: only side 3 rotates. If I comment out the call for side 3, side 1 rotates, and so on. What am I doing wrong?
  4. Ah, I knew it was something like that, I just wasn't sure where it was supposed to go. Thanks so much for all your help and patience.
  5. When speaking of syntax, I meant the syntax required to get the script to compile and run. I realize it is important to understand the logic of what is going on, which is why I asked about how counters function. Thanks for answering that, I now understand at least a tiny bit better. From what you posted, I came up with this: default{ state_entry() { llSetTimerEvent(10); } timer() { gCount = (++gCount)%4; llPlaySound(llList2String(["One","Two","Three","Four"],gCount),1.0); if (gCount == 1) { llStartAnimation("Squinty Eye"); } } However, I think I still need to put in a list for the llList2String to reference, right? In any event, this will not compile. I see now how it is supposed to work, and how to make it work for me, but I am still missing one key line of code, it seems.
  6. Yes, since the last bit of code you posted I have played with it, and I have discovered that llSleep is not the best of options, as the internal animations for facial expressions I am trying to use will not persist through the sleep phase, and in any event are very short. It seems in order to get an extended open mouth anim I will have to trigger "express_open_mouth" repeatedly, Unless you know of a better way to do this? Thanks for posting the timer info, but I am afraid it is just plain beyond me at this point, I looked up llList2String to try to puzzle it out, but was unable to come up with the proper syntax to make the script compile and run, At my level I feel lucky to have guessed correctly where to plug in the last code snippet you posted. Here is what I have so far that works but has the trouble with llSleep: default{ state_entry() { llSetTimerEvent(10); } timer() { if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION){ llPlaySound("ed124764-705d-d497-167a-182cd9fa2e6c",1); llSleep(10); llStartAnimation("express_open_mouth"); llPlaySound("ed124764-705d-d497-167a-182cd9fa2e6c",1); llStartAnimation("express_open_mouth"); llSleep(10); llStartAnimation("express_open_mouth"); llPlaySound("ed124764-705d-d497-167a-182cd9fa2e6c",1); llSleep(10); llStartAnimation ("express_open_mouth"); llPlaySound("ed124764-705d-d497-167a-182cd9fa2e6c",1); llSleep(10);//Etc. }else{ llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);}}} This is shortened considerably; the actual script has 29 llPlaySound calls in it. (And of course the actual UUID's are all different.) As I am using UUID's rather than sounds from the prim's inventory, would I put those in the list llList2String references? Also, I must admit the way timers function has me baffled at this point. I see timer() in your code above, and gCount seems to keep track of the current place in the sequence, but what tells the script to wait until sound One is done before triggering sound Two? The timer, obviously, but I mean how? (EDIT) Oh, it's in the Indexes, I guess, but that whole business is rather opaque to me just now. Also, when using UUID's, is this the best (meaning easiest) way to do this, or can I just put the UUID's in sequence after the llPlaySound call? Thanks for all your patience with a scripting noob.
  7. I'm curious as to what a "more elaborate timing loop" might be?
  8. Hmm. The script I posted here is just an example, not the actual full-blown script. What I want to do is play facial expressions in sequence with the sounds, which is why I put the open mouth one where I did, between two sounds. I am not sure I understand, but it sounds like you are telling me that "the" animation would trigger just once, as soon as the permission is granted. If this is the case, this will not work for my application. What I was hoping for was a simple way for permission to be granted when the script was turned on, and then the loop with the sounds and anims could just play until it was stopped. And yes, a switch is a switch, but in this case when I stop and then restart the sequence by changing script states, the sequence starts from where it left off, which is what I want it to do.rather than start from the beginning,
  9. I want it to start when the script's state is set to TRUE, sorry if that wasn't clear. The script with only the sounds in it already works the way I want, I just need it to be able to also trigger anims. No touch events. And I'm not sure what you mean about the avatar leaving the sim; this is for an attachment.
  10. I've done up a script that loops a sequence of sounds in an attachment: default { state_entry() { llSetTimerEvent(1); } timer() { llPlaySound("One",1); llSleep(10); llPlaySound("Two",1); llSleep(10); llPlaySound("Three",1); llSleep(10); llPlaySound("Four",1); llSleep(10); } } I want to have it also start and stop animations, but am having trouble with the whole permission to trigger animations thing. This is where I'm at so far, but obviously it doesn't work: default { state_entry() { llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llSetTimerEvent(1.0); } } timer() { llPlaySound("One",1); llSleep(10); llStartAnimation("express_open_mouth"); llPlaySound("Two",1); llSleep(10); llPlaySound("Three",1); llSleep(10); llPlaySound("Four",1); llSleep(10); } } I know my feeble attempt probably looks like a joke to a real scripter, but I would truly appreciate it if someone would point me in the right direction, since I seem to be facing the wrong way at this point. :) I need the sequence to loop indefinitely until another script sets this script's state to FALSE. Which so far works, as long as I don't go messing with animations. ;)
  11. Thanks, I just popped back over here to say never mind, I figured it out.
  12. After tracking down a zip file for internal animations, I downloaded and opened it, and discovered that some of them are missing, like express_open_mouth. No big deal, I thought, I'll just use the listed UUID. That got me an error message that the animation was not found. Have some of the facial animations been deprecated, or am I just missing something?
×
×
  • Create New...