Jump to content

Ixia

Resident
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Ixia

  1. Sounds pretty interesting; i always thought there should be a central system for such things, so i don't have to rez some prim with a script or constantly attach and detach 10 huds. Seems quite interesting, might IM you on that
  2. Hm probably some form of updater script that uses llSetRemoteScriptAccessPin llRemoteLoadScriptPin
  3. For your first problem (it doesn't say anything when touched while empty) llSay(50, (string)empty_object_alert); Here your channel number is 50. Only when you use channel 0 it will be visible in actual chat. So: llSay(0, (string)empty_object_alert); For prices not updating. Hm.. are you actually changing the notecard thats in the object? And not the one in your inventory For the \n stuff: If it reads that from notecard i think the actual string contains \\n. So it escapes the \ to turn it into a character \ rather than one for escape codes. You probably can search for \\n using llSubStringIndex and replace ist with \n (I don't know if theres a replace function but if not use llGetSubString Theres also a custom-made replace function: str_replace
  4. Well you don't need a own state for a "sit". Maybe you mean changing click action? llSetClickAction.. Or do you mean he person sits after touching it (with no sit action)? that would require RLV then though
  5. Put it into state_entry, thats called oince, sets the random number and then both of the other events have the same so: float time;float checktime = 1; // after how many seconds should I check for timer changes?float amount = 10;string text = "$$$";default{ state_entry() { time = llFrand(600); llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); llSetTimerEvent(checktime); } timer() { if (llGetTime() > 1 + time)// if (llGetTime() > (1 + llFloor(llFrand(time)))) { llSetText(text, <1,1,1>, 1); } } touch_end(integer touches) {// if (llGetTime() > (1 + llFloor(llFrand(time)))) if (llGetTime() > 1 + llFloor(time)) { llGiveMoney(llDetectedKey(0), (1 + llFloor(llFrand(amount)))); llResetTime(); llSetText("D:", <1,1,1>, 1); } else { llOwnerSay("Not ready yet!"); llSetText("D:", <1,1,1>, 1); } }}
  6. First Line, you can't use a LL-Function there... (outside of states/functions) try just doing like float time; and do time = llFrand(600); in state_entry event
  7. You need a loop, and if you want it to go faster (because each call of llSetLinkTexture has a 0.2 seconds delay) you should take a look at llGetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast with PRIM_TEXTURE
  8. Innula Zenovka wrote: I am not sure I understand exactly what you want to do, but you might find this little tutorial by Chalice Yao over at SLU helpful. Even if it's not what you're trying to do, it's still worth a read -- it was her walkthrough that got me on the road to understanding how to use llRotBetween. ah, that was what I needed thanks Will have to see how to make it slower, but thats the easy part I guess @Void Singer: Well SLERP works too i guess, but since its fractions of the rotation i can't say "rotate towards this but max 2 degress per loop"
  9. I want it non-physical and with llSetRot / llSetLinkPrimitiveParamFast And what do you mean with that two axis represent all possible facings, but not all orientations? I tried around with llRotBetween but no idea how ot apply the result i guess
  10. Hi Hitting my head against a wall with this... can't seem to figure out how to do it. I want and object to slowly point towards the player (preferably set-able as x degrees per loop) Now but I only want it to rotate on global/world z axis and local y axis :D Can't seem to get it to that :/
  11. Well objects you own (or wear) can directly access the RLV functions ( like a relay does ) so in theory it can use any of the functions listed in the RLV API http://wiki.secondlife.com/wiki/LSL_Protocol/RestrainedLoveAPI
  12. It can't block your IMs if you RLV is really off (aka not just your relay) Also I think the OpenCollar Support Group might be bgood for this? for taking it off, probably disable RLV and take it off, if it really doesn't want to be unlocked
  13. Well he never said it has to be remote, did he? Well I'll try a remote system
  14. So I tried this: No idea if it works of if you want that lol.. Bet it can be shortened, but I wanted to keep it easy while trying integer bufferPrim = -1;integer bufferFace = -1;//Basically the "direciton" of cube faces there... so face 0 is upwards and so onlist faceMod = [ <0,0,1>, <0,-1,0>, <1,0,0>, <0,1,0>, <-1,0,0>, <0,0,-1> ];default{ state_entry() { llSay(0, "Hello, Avatar!"); } touch_end(integer total_number) { integer tFace = llDetectedTouchFace( 0 ); if( tFace == -1 ) return; if( bufferPrim == -1 ) { bufferPrim = llDetectedLinkNumber(0); bufferFace = tFace; return; } else { //Get both prims position and sizes list primInfo = llGetLinkPrimitiveParams( bufferPrim, [ PRIM_SIZE, PRIM_POSITION ] ); vector prim1Size = llList2Vector( primInfo, 0 ); vector prim1Pos = llList2Vector( primInfo, 1 ); primInfo = llGetLinkPrimitiveParams( llDetectedLinkNumber(0), [ PRIM_SIZE, PRIM_POSITION ] ); vector prim2Size = llList2Vector( primInfo, 0 ); vector prim2Pos = llList2Vector( primInfo, 1 ); //Get the direciton modificator for the face vector faceVec = llList2Vector( faceMod, bufferFace ); llOwnerSay("Applying face modificator 1: " + (string)faceVec); //Filter out the unneded directions and divide by 2, because we go from center prim1Size = <prim1Size.x*faceVec.x/2.0, prim1Size.y * faceVec.y / 2.0, prim1Size.z * faceVec.z/2.0>; llOwnerSay("Mod: "+ (string)prim1Size); faceVec = llList2Vector( faceMod, tFace ); llOwnerSay("Applying face modificator 2: " + (string)faceVec); prim2Size = <prim2Size.x*faceVec.x/2.0, prim2Size.y * faceVec.y / 2.0, prim2Size.z * faceVec.z/2.0>; llOwnerSay("Mod: "+ (string)prim2Size); //Add the filtered size to the position, now the position vectors are on the center of the faces vector facePos1 = prim1Pos + prim1Size; vector facePos2 = prim2Pos + prim2Size; //Get distance float dist = llVecDist(facePos1,facePos2); llOwnerSay("Dist:"+(string)dist); bufferPrim = -1; bufferFace = -1; } }} Tried with: The distance returned when clicking both "inner" faces was about the same as the Red Prim i pulled up between the 2 was
  15. Isn'T that just eh Get Position of both prims, substract/add half their size and width to get to correct "outer point", Get Distance?
  16. Hm, I'd guess it doesn't actually have to happen that they both are in the same event call? So you'd need some global variable for first winner atleast then if that variable is already set and the second-place person collides the script knows theres already a winner and knows this is the second-place perosn
  17. Oh, I'm sure of the format, its just going to be a list of permission-words with whatever separation... Just wondered if for the actual functionality there is a better way, cause that seems a little complicated ^^
  18. Hi, So i wanted to parse a string to a permission mask so like "mod/copy" would be parsed to whatever PERM_MODIFY | PERM_COPY equals to. So i wondered if theres a better way to do this than something like integer nPerms = ( ( llSubStringIndex( input, "mod" ) != -1 ) * PERM_MODIFY ) | ( ( llSubStringIndex( input,"copy" ) != -1 ) * PERM_COPY ) | ( ( llSubStringIndex( input,"transfer" ) != -1 ) * PERM_TRANSFER );
×
×
  • Create New...