Jump to content

Ruthven Willenov

Resident
  • Content Count

    461
  • Joined

  • Last visited

Community Reputation

120 Excellent

1 Follower

About Ruthven Willenov

  • Rank
    Advanced Member

Recent Profile Visitors

965 profile views
  1. I don't believe that's possible. I think objects lose debit perms when taken back into inventory, and debit perms is how you'd need to do it
  2. Put /me back at the beginning of the string, like: llSay(0, "/me"+ llGetDisplayName(llDetectedKey(0)) + "kisses " + owner + "'s nose. ");
  3. Not in world to check, but calling llGetRot() from an attachment will get the Avatar's rotation, so say to get 1 meter in front of the avatar would be Avpos = llGetPos() Avrot = llGetRot() Offset = avpos+<1.0,0.0,0.0>*avrot
  4. I have a feeling that would be too much of a privacy issue
  5. maybe this? http://wiki.secondlife.com/wiki/Attach#Caveats When detaching an object, llGetAttached() returns 0, but the same happens when dropping an object from an attachment point to the ground. No other indicative event is triggered in the latter case; in particular, the on_rez event is not triggered for attachment drops. If you need to distinguish a drop from a detach, a possible hack is to check llGetObjectPrimCount(llGetKey()). If it's zero, it can be assumed that the object is being detached; otherwise, that it is being dropped.
  6. in the on rez event, use llGetAttached to get the attachment point. if it's not attached it will be 0 default { attach(key id) { llOwnerSay("[ATTACH]"); if(id != NULL_KEY) // Prevent the next bit to run upon detach. { // Do stuff } } on_rez(integer s) { if(llGetAttached() != 0)return; llOwnerSay("[ON REZ]"); // Do different stuff. } }
  7. Try changing the negative values to positive? Negative values in the texture edit window will flip it, so that may be why it's doing it here as well. I never really mess with the zoom feature of this function, and not in world to look at it.
  8. I would also suggest a numbered list, with just numbers for the buttons. using pantera's script, i added a third list for numbered buttons, and when creating the name list, i had it prepend the name with the number list gNames; list gKeys; list gButtons; key gVictim; integer gListenerHandle; stopListener() { llSetTimerEvent(0); llListenRemove(gListenerHandle); } default { state_entry() { stopListener(); llSetText("touch me", <1,0,0>, 1.0); llTargetOmega(<0, 0, 0>, 0, 0); } on_rez(integer start_param) { llResetScript(); } no_sensor() { llOwnerSay("cant find targets"); } touch_start(integer nd) { if (llDetectedKey(0) == llGetOwner()) { llSensor("", NULL_KEY, AGENT, 512, PI); } } sensor(integer num) { integer i; gNames = []; gKeys = []; gButtons = []; key ownerKey = llGetOwner(); if (num > 12) { num = 12; } for (i = 0; i < num; i++) { gNames = gNames + [(string)i + ": " +llBase64ToString(llGetSubString(llStringToBase64(llDetectedName(i)), 0, 31))]; gKeys = gKeys + llDetectedKey(i); gButtons = gButtons + [(string)(i+1)]; } stopListener(); gListenerHandle = llListen(6666, "", ownerKey, ""); llDialog(ownerKey, llDumpList2String(["Select your target"]+gNames,"\n"), gButtons, 6666); llSetTimerEvent(60); } timer() { stopListener(); } listen(integer channel, string name, key id, string message) { stopListener(); gVictim = llList2Key(gKeys, (integer)message-1); state stalking; } } state stalking { state_entry() { stopListener(); llSetText("", <0, 0, 0>, 1.0); llSetTimerEvent(0.1); llSetMemoryLimit(llGetUsedMemory() + 5120); } timer() { vector position = llList2Vector(llGetObjectDetails(gVictim, [OBJECT_POS]), 0); if (position != ZERO_VECTOR) { position = position + <0, 0, -2>; if (position.z < 4096) { llSetRegionPos(position); } integer maxAttemptsPerMove = 25; while (llGetPos() != position && maxAttemptsPerMove > 0) { --maxAttemptsPerMove; llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_POSITION, position]); } } } }
  9. It has nothing to do with scripting or the object's inventory. It's a rigged mesh, and a child link of the HUD. As Wulfie explained above, other avatars won't see it, as it's attached to your HUD. Its the rigging that forces it to be placed in your hand.
  10. The bag is probably rigged mesh, and linked to the HUD. Try editing the HUD, and the bag will probably highlight with it.
  11. I see that now, odd, i was able to do it before. Maybe they "fixed" the viewer code to not let dialogs trigger gestures. I had a bingo hud with a "Bingo" button that would pop up a dialog with /bingo to trigger a gesture i had to say "BINGO!" and play a sound. tried it again after not using it for a while, and you are right, it didn't trigger it now, and i checked to make sure the gesture is still active
  12. Well you can, sorta. As long as the llDialog is set to channel 0, and the button contains text that will trigger a gesture EDIT: Nevermind, it worked for me before, maybe the viewer code changed to ignore llDialog in relation to gestures
  13. If for any reason the seated avatar doesn't own the vehicle, you could get an agent list, and run a loop using llGetObjectDetails(agent,[OBJECT_ROOT]) to see if their root matches the detected object: key agentonobject(key obj, list agents) { integer len = llGetListLength(agents); integer i; for(i = 0; i < len; i++) { key agent = llList2Key(agents,i); list details = llGetObjectDetails(agent,[OBJECT_ROOT]); key root = llList2Key(details,0); if(root == obj)return agent; } return NULL_KEY; } default { state_entry() { llVolumeDetect(TRUE); } collision_start(integer n) { key obj = llDetectedKey(0); if(llDetectedType(0) & AGENT)//detected a non-seated avatar { llSay(0, llKey2Name(obj) + " walked or ran through me"); } else//an object passed through { key agent = agentonobject(obj,llGetAgentList(AGENT_LIST_PARCEL,[])); if(agent) { llSay(0, llKey2Name(agent) + " is seated on an object that passed through me"); } else { llSay(0,"No one was seated on the object that passed through me"); } } } }
  14. oh, certainly. i never really see anyone use them, or maybe i'm not going to the right places, but teleport effects have been around for a while. from what i understand, they are triggered before and after the teleport https://marketplace.secondlife.com/products/search?utf8=✓&search[category_id]=&search[maturity_level]=GMA&search[keywords]=teleport+effect
  15. how about doing the llGetInventoryList in the attached event, as well as getting permission to attach. In the touch event, check that it's attached to a hud integer attached = llGetAttached(); if(attached > 30 && attached < 39)//if in the range of 31-38, it's a hud if it's not, return. only the owner can touch their hud, so no need to see if the owner is the one touching. i modified it a bit to only work when attached, create the list on attach, and to account for no-copy items. In the runtime_permissions, i changed it to check if it's already attached before attempting to attach. on attach i also added again the attach perms so it would be able to detach. changed the touch command for detach to only check if it has perms then detach. Not tested for other buttons, but i didn't mess with anything else anyways // Links must begin with http:// or https:// string link1 = "https://marketplace.secondlife.com/stores/111111"; string link1_name = "Marketplace"; string link2 = "http://www.facebook.com"; string link2_name = "Facebook"; string link3 = "http://www.instagram.com"; string link3_name = "Instagram"; string link4 = "http://www.twitter.com"; string link4_name = "Twitter"; string link5 = "http://www.youtube.com"; string link5_name = "Youtube"; // Needed for basic functionality. float alpha = 0.5; key owner; integer ocillator; list inventory = []; list nocopy; getitems() { integer num = llGetInventoryNumber(INVENTORY_ALL); inventory = []; string script = llGetScriptName(); while (num--) { string name = llGetInventoryName(INVENTORY_ALL, num); if(name != script) { integer perms = llGetInventoryPermMask(name,MASK_OWNER); if(perms & PERM_COPY) { inventory += name; } else { nocopy += name; } } } } default { on_rez(integer n) { if(!llGetAttached()) { // If the object is rezzed on the ground, try attaching to owner's HUD. llOwnerSay("Please allow me to be on your HUD!"); llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } } run_time_permissions(integer permissions) { if(permissions & PERMISSION_ATTACH) { // If permission was granted, attach to owner's HUD. if(!llGetAttached())//only try to attach if it's not already llAttachToAvatar(ATTACH_HUD_CENTER_1); } } attach(key id) { if(id) { llSetRot(llEuler2Rot(<0,270,270> * DEG_TO_RAD)); llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); owner = id; } } touch_start(integer num) { integer attached = llGetAttached(); if(attached > 30 && attached < 39)//if in the range of 31-38, it's a hud { integer face = llDetectedTouchFace(0); if(face == 1) // When the first (front) face is touched... { integer len = llGetListLength(inventory); if(len) { llGiveInventoryList(owner, llGetObjectName(), inventory); } len = llGetListLength(nocopy); if(len) { llOwnerSay("There are no copy items that could not be given in the folder"); integer i; for(i = 0; i < len; i++) { string name = llList2String(nocopy,i); llGiveInventory(owner,name); } } // Turn around to show social media buttons. llSetRot(llEuler2Rot(<0,90,90> * DEG_TO_RAD)); } else if(face == 2) { if(llGetPermissions() & PERMISSION_ATTACH) llDetachFromAvatar(); } // When the social media buttons are touched... else if(face == 7) { llOwnerSay("Follow me on ["+link1+" "+link1_name+"]!"); } else if(face == 6) { llOwnerSay("Follow me on ["+link2+" "+link2_name+"]!"); } else if(face == 5) { llOwnerSay("Follow me on ["+link3+" "+link3_name+"]!"); } else if(face == 4) { llOwnerSay("Follow me on ["+link4+" "+link4_name+"]!"); } else if(face == 3) { llOwnerSay("Follow me on ["+link5+" "+link5_name+"]!"); } } } state_entry() { llSetRot(llEuler2Rot(<0,270,270> * DEG_TO_RAD)); llSetTimerEvent(0.1); } timer() { // If the alpha has reached a limit, // change which way the alpha changes. if(alpha < 0.1 || alpha > 0.9) ocillator = !ocillator; // Increase or decrease the alpha if(ocillator) alpha += 0.05; else alpha -= 0.05; llSetAlpha(alpha, 0); } }
×
×
  • Create New...