Jump to content

xtc4u

Resident
  • Posts

    41
  • Joined

  • Last visited

Everything posted by xtc4u

  1. Yeah, but screen real estate is already at a premium. Thanks for all the help. I did learn a lot investigating this dilemma however.
  2. OK, to bad. I always found it annoying that you had to change to public chat in order to see messages coming from the bed for instance. There you are interacting with someone and the message from the bed or pose ball goes to public chat. You have to either switch back and forth from public chat and your private chat. Or just have your private (intimate chat) done in public. Oh well, I can understand the reasons for not allowing it I guess. Spammers would find a way to exploit it. At least now I understand the different colors I have seen in chat. Interesting brown, beige. I did figure out the green messages already.
  3. OK, so I have it all working but..... What I really want is to send the message to the chat channel that myself and this person are in private chat. So the original question still stands. I know I can't send a message from an object that looks like it's comming from me, but can I send a message to the private chat window coming from the object using llRegionSayTo's second parameter of the channel to send it on. I need to figure out that channel.
  4. I just figured out that I probabily use llInstantMessage(). Just have to find out the key for the avatar that is in the mutual chat. I could scan for them, but then I would have to pick them from a list of possilbe others if some are nearby.
  5. I want to send messages to the current chat channel, not the nearby chat (0). In other words if I am having a private chat with someone how can a script send messages to that chat window?
  6. I meant the llSleep on the "channel 2 has timed out."
  7. What you are saying is that if you pass "doit" for instance on channel 3, then a subsequent message of "doit" on channel 2 will not set the color to red? The only thing I can think if is that you are sending the message to channel 3 before the 60 second llSleep after sending a message to channel 3 has timed out.
  8. OK here is the final version, tightened up a bit and only one function. Thanks for the help and second set of eyes. Note it does not check if the prim number is valid. // Rotate a child prim // degrees: number of degrees to rotate (i.e 10, -10)// xyz: axis to rotate (i.e. "x", "y", "z")// prim_nun: child prim numberMoveChildsRot(float degrees, string xyz, integer prim_num){ list lRot = llGetLinkPrimitiveParams(prim_num, [PRIM_ROT_LOCAL]); vector angles_in_radians; if (xyz == "x") { angles_in_radians = < degrees,0,0 > * DEG_TO_RAD; } else if (xyz == "y") { angles_in_radians = < 0,degrees,0 > * DEG_TO_RAD; } else if (xyz == "z") { angles_in_radians = < 0,0,degrees > * DEG_TO_RAD; } // rotate the child prim llSetLinkPrimitiveParamsFast(prim_num , [ PRIM_ROT_LOCAL,(llList2Rot(lRot, 0) * llEuler2Rot ( angles_in_radians ))] ) ; }
  9. Wow, talk about a big time rookie mistake. I have stared at this code for you can't imagine how long, I really should have spotted that. Thanks much. As to the if vs. if else. I agree I should have used the if else's but wouldn't it have worked even with just the if's. I'm assuming it would have but would be less efficient code. I guess that is what you meant by one fatal and one "not fatal". Again thank you.
  10. Trying to write a general rotator of child prim routine. The code below works but only rotates on a single axis whether I pass in x, y or z. I'm sure it's a matter of basic misunderstanding of rotation but I am stumped. Whether I call MoveChildsRot as below I get the same rotation on the Y axis: MoveChildsRot(10, "x", 2); llSleep(2); MoveChildsRot(10, "y", 2); llSleep(2); MoveChildsRot(10, "z", 2); // calc the rotation rotation rotAmount ( float amt, string xyz) { vector x_angles = < amt,0,0 >; vector y_angles = < 0,amt,0 >; vector z_angles = < 0,0,amt >; vector angles_in_radians; if (xyz = "x") { angles_in_radians = x_angles* DEG_TO_RAD; // Change to Radians } if (xyz = "y") { angles_in_radians = y_angles* DEG_TO_RAD; // Change to Radians } if (xyz = "z") { angles_in_radians = z_angles* DEG_TO_RAD; // Change to Radians } if (debug) llOwnerSay("Angle in Radians: " + (string)angles_in_radians); return llEuler2Rot ( angles_in_radians ); // Change to a Rotation } // Rotate a child prim // nAmount: number of degrees to rotate (i.e 10, -10) // str_xyz: axis to rotate (i.e. "x", "y", "z") // nun: child prim number MoveChildsRot(integer nAmount, string str_xyz, integer num) { // rotate a child prim list lRot = llGetLinkPrimitiveParams(num, [PRIM_ROT_LOCAL]); rotation localRot = llList2Rot(lRot, 0); // current Rot rotation deltaRot; if (debug) llOwnerSay( (string)nAmount); if (debug) llOwnerSay("xyz: " + str_xyz + " " + (string)localRot); deltaRot = rotAmount ((float)nAmount,str_xyz) ; llSleep(.5); if (debug) llOwnerSay("xyz2: " + str_xyz + " Delta: " + (string)deltaRot); llSetLinkPrimitiveParamsFast(num , [ PRIM_ROT_LOCAL, (localRot * deltaRot)] ) ; }
  11. That is a good idea. Is there a way to communicate between the two object/scripts so each knows the alpha state of the other?
  12. Does anyone know a way to move an attachment from one attachment point to another from a script within the object. Say I want to move something from one hand to the other, like passing a ball between an avatars hands. I did try the simple way of detaching and trying to attach but the object was out of scope and back in inventory before the attach call happened.
  13. "Solved" my problem by installing LSLEdit on a PC at work, formated the code and pasted it back in. Actually the editor was very good and I may use when at a PC. Just wish there was a Mac version of it. Finally got the Eclipse plug-in installed but either I can't find the run script or there isn't one. The one in LSLEdit is pretty good and gets you at least the basics.
  14. Re: the LSLForge + Eclipse. Does anyone know if there is a code formatter in Eclipse that will autoformat code for a script. I have a script that has mixed coding styles and I would like to format it in one click. I'm on a Mac so LSLEditor isn't the solution. Thanks
×
×
  • Create New...