Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About LaurisFashion

  • Rank

Recent Profile Visitors

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

  1. llSetLinkPrimitiveParams(5,[PRIM_TEXTURE, 1, textureName, <1,1,1>, <0,0,0>, 0 ]); The script displays the texture on Face #1 of the prim that is #5 in the linkset (see the first argument of llSetLinkPrimitiveParams). When linking multiple prims together into a linkset, the prims are numbered in reverse order, with the last one (which becomes the root) numbered 1. You may need to adjust this to match how you linked your vendor linkset (unless it's a single prim, in which case you'd better use llSetPrimitiveParams) .
  2. So you have a scripted object, "Giver", that should give an "Item" when someone touches it. Function llGiveInventory() looks for the Item in the Giver's inventory. The Item needs: to be in the Giver's inventory to have these access rights: Copy, Transfer llGiveInventory() uses two arguments: ID of the target who will receive the Item Name of the Item // Which item do we want to give? string Item = "MyGiftToYou"; default { touch_start(integer touchers) { // Let's check that the item actually is in the inventory: if(~llGetInventoryType(Item)) { // If it is, then give it to the person who touched. llGiveInventory(llDetectedKey(0), Item); } } }
  3. Thanks! The llDetectedTouchST() is definitely a good call. I tried the UV version and since I'm rotating the texture on that face, it was giving me crazy wild results. On the other hand I used llAtan2(), which seems to be made specifically for such a purpose
  4. Alright, never mind! I've opened some old math books and ran through LSL documentation, and this is a working solution. Feel free to use it if you need to achieve a similar effect. integer TouchF; vector TouchST; float Radian; float Angle; default { state_entry() { llSetText("",ZERO_VECTOR,0); } touch_start(integer total_number) { TouchF = llDetectedTouchFace(0); // We are using llDetectedTouchST(), because that one gets coords from the face // while llDetectTouchUV() gets coords from texture. Since we're rotating the // texture, that would yield ever changing wrong results. TouchST = llDetectedTouchST(0); // Only apply when the touch is on the interactive face if(TouchF == 0) { Radian = llAtan2(TouchST.x - 0.5, TouchST.y - 0.5); llRotateTexture(Radian*-1,0); // We can use the degrees of rotation for anything later. Angle = Radian * RAD_TO_DEG; } } }
  5. Hi fellow scripters and builders! I'm working on a control HUD to one of my upcoming projects, and I've kind of hit a dead end thanks to my insufficient trigonometry. What I need is the following: I've got a face on the HUD. It's middle point represents a pivot. The HUD wearer can click the face, and I need to be able to get the angle (calculated from the "upwards" Z axis) from that. The click provides coordinates in the form of a vector <u,v,0> where U is the horizontal coord, V is the vertical coord, and they both are a range from 0.0 to 1.0 - using function llDetectedTouchUV() I'm attaching a visualization of what I have in mind. I'm sure this is a trivial problem, but for someone who had long forgotten everything about trigonometry, it's a total blocker. Thank you to whoever will be able to help me out! ♥
  • Create New...