Jump to content

w1zard

Resident
  • Posts

    37
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Hello SL'ers, When I set the name of a prim, to a string containing unicode characters, "™".ie, the prim name is successfully set, but these characters are replaced by "???" - Can anyone think of a way that I can strip unicode chars from a string to make it plain ascii, to prevent these awefull ?????????????????'s from appearing. Cheers, w1zard :-)
  2. What's the best way to ensure a prim can move to a position before it goes there? I want a prim to be free to move through parcels where it is allowed to, but if its not allowed to cross over to a position inside a different parcel I want to know so that moving it there wont silently fail. Is there a better method than just checking to see if it's position changed after trying to move there, so that I can know ahead of time if its not going to be possible to reach that destination? Cheers, w1z
  3. brilliant! problem solved. This works a treat, I'll have to try and figure out how it works now Nice one Void tyvm
  4. Hi, I am really struggling with rotation functions/math :( This is where I need to get to, I am hoping someone can help point me in the right direction :matte-motes-wink: The prim is currently facing a random direction. I know this direction by obtaining the rotation from llGetPos. I also know the point where I need the prim to turn around to. The first thing I need help figuring out from these two values, is if it is quicker to turn left, or right. Rotation direction A in the example above would be the quickest direction to turn. I have a hard time understanding the examples and documentation. on the wiki. I have had many mixed results for this and have realised how far I am out my depth here. The second thing I need to do, is turn the prim (via the shortest direction ie. left or right) to the target rotation, in intervals, of for example 1 degree. I have had problems here ensuring it does actually go the right direction, and also doesnt overshoot the target. I cannot use llTargetOmega and I must use rotate in intervals, because the prim is phantom the strength of the rotation is not applied. I am really hopefull someone is willing to take the time and help me understand the math involved here! Many thanks, w1zard
  5. @NatM - I think we are all eager to see the screen shots that you have. If this is true that there is a hole, then it wouldnt take much for a clever hacker to exploit a SMB vul using metasploit It would most likley have to be this specific vulnerability as it affected a wide range of windows os's, which is quite old though.. Microsoft Security Bulletin MS08-067 – Critical Vulnerability in Server Service Could Allow Remote Code Execution (958644) see how its done: personally I think they just have an invis avatar and took screen shots of you to sh1* you up lol :matte-motes-big-grin-squint:
  6. You can make a http request to a php script which can obtain the owner key & name via the http headers, make the php script create a session and output the session key to be parsed by the in world script. The script could then set the location of the shared media to the out of world php script containing the media player html, passing the session key obtained from the first php script via a get variable so that it knows which avatar is using the shared media. This would bode well for loading favourites or other user specific variables. If you load the jquery javascript framework library within the html you can use its ajax get request to make a callback to the first php script which can record the users actions against their session. You would then either have the in world object act as a web server or receive email from the php script or otherwise periodically request for updates from the first script regarding the users actions, fastest option would be preferable of course. In world to out world communication is perfectly doable through shared media with php, mysql & ajax but I guess the question is, is it worth it? Your looking at a very technical solution .. Good Luck
  7. Hey all, I am looking at http://wiki.secondlife.com/wiki/Rotation It only shows the constant RAD_TO_DEG, no example Is anyone able to show me how to convert a rotation 2 vector Ty W
  8. Yea I figured there would out there somewhere, no one thought to post any links though Either way, I like the challenge, and feel a greater sense of accomplishment learning from my own mistakes.
  9. And we have a winner! @Void - What you said made sense, iv reverted to the original script(s) which I have modified (and now works) - Just need to condence it down to one script again. Thankyou!
  10. Hi Helium, Thanks for posting your script. When I put it in my test object, this is what I see: 1) Original Object on Left & Right. 2) I scale up the object on the Right. 3) When I click the object on the right, it does not revert back to its original positions or scales as shown in image 1
  11. thats not the problem, I am only using 5 prims to test the script and the output is fairly small. Build 5 cubes (Into an X pattern), link them, drop the script in. When the script is placed inside and it will give you the default position array. Edit the script with the lsl code that was output, save it, then resize the object and when you click it its supposed to go back to its original scale (the root position wont change). The problem is that it doesnt change the positions, and the scale of each prim is set to the minimum value. I think that I might be providing the wrong primID's to setprimitiveparams and also get primitiveparams. Maybe someone could tell me how I can get all ID's for all the prims in the linked object. With that I could ensure that the right ID's are being used. When the script starts it should say something like: My current size is: list defaultPrimParams = ["0|<0.00000, 0.00000, 0.00000>|<183.26640, 236.83130, 29.26685>","1|<0.50000, 0.50000, 0.50000>|<0.00000, 0.00000, 0.00000>","2|<0.50000, 0.50000, 0.50000>|<0.00000, 0.51840, 0.48844>","3|<0.50000, 0.50000, 0.50000>|<0.00000, 0.51840, -0.51371>","4|<0.50000, 0.50000, 0.50000>|<0.00000, -0.50829, -0.51371>","5|<0.50000, 0.50000, 0.50000>|<0.00000, -0.51425, 0.52073>"]; Which is what you can use to update the default param array at the top of the script PrimID | Size | Local Position As you may realise the values look odd, I think iv hit the nail on the head with the problem because LINK_ROOT = 1; I can get the amount of prims in the linked object, but where do their ID's start? at 2? Would really appreachiate it if anyone finds the time to drop it into a basic object with more than 1 prim such as the one described above, only takes 10 seconds.
  12. Ok here is the refactored code. What am I doing wrong here? //Master Resize Scriptlist defaultPrimParams = [];default{ state_entry() { llOwnerSay("My current params are is: "); //for each prim integer primCount = llGetNumberOfPrims(); integer currentPrim = llGetLinkNumber(); integer p = 0; string output="list defaultPrimParams = ["; for(;p<primCount+1;p++) { output+="\""; output+=(string)p+"|"; //primID output+=(string)llList2Vector(llGetLinkPrimitiveParams(p,[PRIM_SIZE]),0)+"|"; //Scale output+=(string)(llGetPos()-llList2Vector(llGetLinkPrimitiveParams(p,[PRIM_POSITION]),0));//Position Distance from currentPrim output+="\""; if(p!=primCount) output+=","; } output+="];"; llOwnerSay(output); } touch_start(integer total_number) { //Resets to default size integer prims = llGetListLength(defaultPrimParams); integer p = 0; for(;p<prims+1;p++) { string paramsString = llList2String(defaultPrimParams,p); list paramsList = llParseString2List(paramsString,["|"],[]); integer primID = llList2Integer(paramsList,0); vector primScale = llList2Vector(paramsList,1); vector primPositionDistance = llList2Vector(paramsList,2); llSetLinkPrimitiveParamsFast(primID,[PRIM_SIZE,primScale]); llSetLinkPrimitiveParamsFast(primID,[PRIM_POSITION,llGetPos()+primPositionDistance]); } }} + 1 Kudos to the Guru that knows their $%*7
  13. Thanks Dora, you were very helpfull. :matte-motes-bashful-cute-2:
  14. Ah, so you are saying I should record the default size for every prim. And also the difference in positions I guess.
  15. Yes I dont intend to keep it like that.... this is a first pass, and I need to correct the calculations before I refactor.
×
×
  • Create New...