Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ImojenSander

  1. hi, ok i have 2 doors a drawbridge and a gate on the touch of a seperate button on the wall i want to run both scripts that open them both which i have, at the moment the scripts on the doors are click and it opens. Any scripts or pointers to help me acheive this would be very welcome. thank you.
  2. yes thats it knew i wasnt doin somethin right, newbie mistake thank you
  3. thanks for the reply yes everything is spelt right its in the right prim and its in the object folder
  4. ok hoping someone can help, i just want to rez a simple object by pressing a buttin with the below script in it Now the object is called hand and its in my objects folder with permissions copy no mod no trans, but keep getting this when button is pressed Could not find object 'hand'. What am i doing wrong. thanks // Rez an object on touch, with relative position, rotation, and velocity all described in the rezzing prim's coordinate system. string object = "hand"; // Name of object in inventory vector relativePosOffset = <2.0, 0.0, 1.0>; // "Forward" and a little "above" this prim vector relativeVel = <1.0, 0.0, 0.0>; // Traveling in this prim's "forward" direction at 1m/s rotation relativeRot = <0.707107, 0.0, 0.0, 0.707107>; // Rotated 90 degrees on the x-axis compared to this prim integer startParam = 10; default { touch_start(integer a) { vector myPos = llGetPos(); rotation myRot = llGetRot(); vector rezPos = myPos+relativePosOffset*myRot; vector rezVel = relativeVel*myRot; rotation rezRot = relativeRot*myRot; llRezObject(object, rezPos, rezVel, rezRot, startParam); } }
  5. hi, iv been trying to search for a solution to this but failed, im sure the answer is staring me in the face. I have a basic texture change script that when you click the object it changes texture lets call this object2, but, i want to click an in world object, lets call this button, to texture change object2, but i cant work out the script to tell object2 to change to next texture when button is pressed. I know object2 needs to have llListenscript in it but i don't know how to communicate the button request to object2 any help n guidance would be appreciated thank you
  6. ok thanks thats helped me to go in the right direction cheers
  7. hi i got a script that when clicked on changes texture on the object, however this object i want to be a button you click and the texture changes on a object next to it. iv seen the swashbucklers script but couldnt get it to work. any help would be aperciated integer choice; default { // state_entry() // { // llSetTimerEvent(Timer); // } // timer() touch_start(integer total_number) { integer number = llGetInventoryNumber(INVENTORY_TEXTURE); choice ++; if (choice == number) choice = 0; string name = llGetInventoryName(INVENTORY_TEXTURE, choice); if (name != "") llSetTexture(name, ALL_SIDES); } }
  8. ok thanks for all ur help n advise iv got it working great thanks again
  9. hi i have a script to fade out an object then click to fade back in again. What im looking for is how to say in local chat 'lock' or 'unlock' so it stops fade out when clicked. heres the script. touch_end(integer total_number) { float alpha = 1.0; while(alpha > 0.0) { alpha -= 0.1; llSetAlpha(alpha, ALL_SIDES); llSleep(cloakSpeed); } state cloaked; } } state cloaked { touch_end(integer total_number) { float alpha; while (alpha < 1.0) { alpha += 0.1; llSetAlpha(alpha, ALL_SIDES); llSleep(cloakSpeed); } state default; } }thanks
  10. ok i got this great script that slides a door open, but only slides object along the Yaxis i want it to go x or z axis heres the script. Any help would be amazing i dont think the code is scripted in to achieve this thanks key owner; // Will be used to retrieve owner's key. integer iChan = 1000; // Channel door will listen on if other doors are touched; // also the channel this door will broadcast on. integer iSteps = 15; // How many steps the door will open in, used to provide the // illusion of sliding. Fewer steps means it opens faster, // but more steps will make it "slide" smoother. vector vOffset = <0.0, 0.30, 0.0>; // Indicates how far the door will move with each step. // Multiply by iSteps to calculate the total distance the // door will move. vector vBase; // Used to "un-stick" the door if something blocks it. // Not sure if this is needed since 0.5.1, objects don't // seem to block the door any more. Leaving it in just // in case, though. I think attempting to edit the door // while it's moving may make it stick. This will solve // that problem as well. float fOpenTime = 1.5; // How long the door stays open string sSKeyword = "open1"; // Keyword door broadcasts when it's touched, to make // other doors open. You can chain these to make multiple // doors open when any one is touched. // NEVER make sSKeyword and sRKeyword the same, or you may // get some doors stuck in an infinite loop, continuously // re-triggering each other. string sRKeyword = "open2"; // Keyword door listens for from other doors. Will open // when it "hears" this keyword. // Again, NEVER make sSKeyword and sRKeyword the same. integer bMove = FALSE; // Is the door moving? integer bLock = FALSE; // Is the door locked? integer bVerbose = FALSE; // Confirm when owner locks/unlocks the door. //********************************************* // open() -- the meat and taters of the code, // makes the door actually move. //********************************************* open() { bMove = TRUE; integer i; vector basepos = llGetPos(); for (i = 0; i < iSteps; i++) { llSetPos(basepos + i*vOffset); } vOffset *= -1; llSleep(fOpenTime); basepos = llGetPos(); for (i = 0; i < iSteps; i++) { llSetPos(basepos + i*vOffset); } vOffset *= -1; if (llGetPos() != vBase) { llSetTimerEvent(5); } else { bMove = FALSE; } } default { //*************************************************** // state_entry() -- set up our global variables and // initialize the listen events. //*************************************************** state_entry() { vBase = llGetPos(); owner = llGetOwner(); llListen(0,"",owner,""); llListen(iChan,"",NULL_KEY,sRKeyword); } //*************************************************** // listen() -- listen for other doors opening, and // if owner wants to lock/unlock doors. //*************************************************** listen(integer chan, string name, key id, string msg) { if (chan == iChan && msg == sRKeyword) { if (!bMove && !bLock) open(); if (bLock && bVerbose) llSay(0,"Locked!"); } if (chan == 0 && id == owner && msg == "lock") { bLock = TRUE; if (bVerbose) llWhisper(0,"Locked!"); } if (chan == 0 && id == owner && msg == "unlock") { bLock = FALSE; if (bVerbose) llWhisper(0,"Unlocked!"); } } //******************************************** // touch_start() -- what to do when someone // touches the door. //******************************************** touch_start(integer count) { if (bLock) { llSay(0,"Locked!"); } else { if (!bMove) { llWhisper(iChan,sSKeyword); open(); } } } //**************************************************** // timer() -- this is only used to un-stick the door // (see vBase definition above). //**************************************************** timer() { llSetPos(vBase); if(llGetPos() == vBase) { llSetTimerEvent(0); bMove = FALSE; } } }
  • Create New...