Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About KiondraeLoc

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This is the script I have in my hud: string TargetName = "n"; default { state_entry() { // run this code when entering the default state // displays red "OFF" as floating text above the prim llRegionSay(3, "off"); llSetText("OFF", <1,0,0>, 1.0); llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA); llClearCameraParams(); llSetTimerEvent(0.0); } touch_start(integer num_detected) { // when touched, switch to state named 'on' state on; llRegionSayTo("n", 3, "on"); } } state on { state_entry() { llRegionSay( 3, "on"); // run this code when entering state 'on' // displays green "ON" as floating text above the prim llSetText("ON", <0,1,0>, 1.0); llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA); llSetTimerEvent(0.022); llListen(4, "","", ""); } touch_start(integer num_detected) { // when touched, switch to the default state state default; } listen(integer channel, string name, key id, string message) { if(llGetPos()) { list data = llGetObjectDetails(TargetName, [OBJECT_POS, OBJECT_ROT]); vector pos = llList2Vector(data, 0); rotation rot = llList2Rot(data, 1); llSetCameraParams([ CAMERA_ACTIVE, TRUE, CAMERA_FOCUS_LOCKED, TRUE, CAMERA_POSITION_LOCKED, TRUE, CAMERA_FOCUS, pos, CAMERA_POSITION, pos + (<0, -2, 1> * rot) ]); } } } This is the script I have in my RC Flying Drone: string TargetName = "n"; default{ on_rez(integer r){ llResetScript(); } state_entry() { llListen(3, "","", ""); } listen(integer channel, string name, key id, string message) { if (llGetOwner() != llGetOwnerKey(id)) {return;} if(message == "on") { llSetTimerEvent(0.05); } if (message == "off") { llSetTimerEvent(0.0); } } timer() { llSetObjectName(TargetName); llRegionSay(4,(string)llGetPos()); } } How can I get the camera to track the object and not the bottom left corner of the sim at <0,0,0>? I don't want to use the object uuid, I want to use the name of the object to track on a channel so I don't have to keep changing the uuid of my object every time I rez it.
  2. How can I get my avatar to immediately sit on a prim upon rez? I've looked at some of the sit functions and can't figure it out. Thanks.
  3. Thanks everyone, now I have all the pieces I need to put my script together.
  4. I want to replace llOwnerSay("beep"); with a touch function that will let me change the texture right or left based on commands along side the buttons. I just don't know the right command to look up to use here.
  5. // Says beep to owner the first time owner says something in main chat // and then stops listening integer listenHandle; remove_listen_handle() { llListenRemove(listenHandle); } default { state_entry() { // Change the channel number to a positive integer // to listen for '/5 hello' style of chat. // target only the owner's chat on channel 0 (PUBLIC_CHANNEL) listenHandle = llListen(0, "", llGetOwner(), ""); } listen(integer channel, string name, key id, string message) { // we filtered to only listen on channel 0 // to the owner's chat in the llListen call above llOwnerSay("beep"); // stop listening until script is reset remove_listen_handle(); } on_rez(integer start_param) { llResetScript(); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } } I want to change llOwnerSay("beep"); to a touch function and I'm not sure how to do that. What command will allow this?
  6. Instead of touch_start(), is there a way to command the object through chat to be touched without clicking on it?
  7. //You would put the uuid key of your textures in here like this list textures; integer textureIndex; //How far through the above list of textures we have moved integer textureLink=1; //Change to the link number to display the texture integer rightButton=2; //Change to the link number of the right button integer leftButton=3; //Change to the link number of the left button default{ state_entry(){ //Here so that everytime you save, add a new texture etc it will reset the image being displayed back to the first image in the list textureIndex=0; llSetLinkTexture(textureLink,llList2String(llGetInventoryNumber(INVENTORY_TEXTURE),textureIndex),ALL_SIDES); } //You can use llSetLinkPrimitiveParams as well to change the texture but as you seem to be a learner and because its simpler for a learner to understand iv used llSetLinkTexture touch_start(integer x){ //Change "right button" and "left button" to the link number of the buttons you are pressing if(llDetectedLinkNumber(0)==rightButton){ //Move down through the textures or "to the right" ++textureIndex; //Display the texture llSetLinkTexture(textureLink,llList2String(llGetInventoryNumber(INVENTORY_TEXTURE),textureIndex),ALL_SIDES); //Check if we have reached the end of the list and if so go back to the start if(textureIndex==llGetListLength(textures))textureIndex=0; }else if(llDetectedLinkNumber(0)==leftButton){ //Move up through the textures or "to the left" --textureIndex; //Display the texture llSetLinkTexture(textureLink,llList2String(llGetInventoryNumber(INVENTORY_TEXTURE),textureIndex),ALL_SIDES); //Check if we have reached the start of the list go back to the end if(textureIndex==llGetListLength(textures))textureIndex=llGetListLength(textures)-1; } } } I thought maybe adding llGetInventoryNumber(INVENTORY_TEXTURE) in place of textures would allow me to drop textures in the root prim and it would automatically detect them, but that puts me back at step one, trying to figure out how to make it work. What should I change to get it to detect the textures automatically so I don't have to update the list if I add, say 157 textures?
  8. This helps me understand how it works better, thank you.
  9. The script works and I can modify it in Second Life, I just wish the buttons worked like that in Opensimulator as well. I wonder what functions I should change to make it work in Opensimulator.
  10. I want to make a script containing a next and previous button(s) to scroll trough a large amount of textures. Should I make a main script that uses llSay(); with a listen script in the listener prim or should I do one script that calls on the names of the prims in the linkset? Also what LSL functions would be required to achieve this?
  11. I figured it out, it's because the llLookAt command and others like it are single focused. They can't make the prim do two separate things at once using the same command. It's like trying to look to the left and to the right at the same time.
  12. I'm looking for one that make the objects follow without too much lag while traveling in the spaceship and I haven't found any in the Marketplace. The only ones I see are in spaceships that are no modify.
  13. Where can I find a good scene rezzer for a spaceship?
  14. Thanks, this most certainly helps.
  • Create New...