Jump to content

tylex Fallen

Resident
  • Posts

    7
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

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

  1. Solved! I forgot to apply the modifier i was using.
  2. Hello, I've recently been learning Blender to use in SL and managed to get a very simple chess piece made up. For some reason when I export it as .dae and import it into SL, it won't load and says "Missing required level of detail." The logs don't seem to show anything useful: I've uploaded the .blend file on google drive if that's needed: https://drive.google.com/file/d/1nu12ZVqXIUq4Yn9XSE2jG1HdvDJE9GrM/view?usp=sharing I've looked all over for an answer but haven't found a solution. The triangle count is only 272, so it definitely isn't too complex. Any help would be very much appreciated!
  3. Ahh yes, multiple scripts should work perfectly! Should've thought of that to begin with! Thank you!! Out of curiosity, what flag does the mask integer 6 in that function represent? The wiki only shows 1, 2, 4, and 8 as usable integers. Thanks again!! EDIT: For reference, I am making an air hockey puck and trying to emulate the effect where the puck actually gains momentum on its own due to the air jets. I would need a restitution value higher than 1.0 in order to achieve this.
  4. Hello, I'm looking for help getting the following code to work: vector origPos; default { touch_start(integer total_number) { origPos = llGetPos(); llSay(0, "Puck position set!"); } state_entry() { //llCollisionFilter("Paddle", "", TRUE); //llCollisionFilter("Wall", "", TRUE); llListen(0, "", "llGetOwner()", ""); llSay(0, "Touch puck to save home position!"); } listen(integer channel, string name, key id, string message) { if(message == "reset") { llSetStatus(STATUS_PHYSICS, FALSE); llSetPos(origPos); llSetVelocity(<0,0,0>, 0); llSetStatus(STATUS_PHYSICS, TRUE); llSay(0, "Reset!"); } } collision_end(integer total_number) { vector spd; while (llVecMag(spd = llGetVel()) > 0.001) { llApplyImpulse(spd * 0.000025, 0); } } } The problem is that if the while loop is running, the listen event isn't. I need a way to interrupt the loop while it is running. Any help is very much appreciated! Regards, tylex Fallen
  5. Hi Fenix, Thanks for clarifying this for me! I can't believe I didn't realize that as I was adding Sleeps in random spots for exactly that reason. And yeah, sorry, I forgot to take out the purposely failing if statement I was using to get the prim back to it's original size(I left my on_touch event out of the post as I didn't find it relevant). Heading out to enjoy my Saturday, but I'll be trying this first thing when I get home! Thanks again!!! @Jenna Huntsman Sorry, that was just how the in-browser text editor was formatting my post for some reason.
  6. For some reason, the values I'm getting from my notecard to set the size of the prim are not correct(possibly null due to 0.01m returning for both variables). I've filled the notecard as follows for testing: 9 9 9 9 9 Expected behavior: Change the X and Z values in "desiredSize" to the values on lines 1 and 3 of a notecard. Issue: The script does change the size of the prim, however it changes it to <0.01000, 0.75000, 0.01000> and I have no idea where it got the 1st and 3rd values. I should also mention, the 'String2Float' bit was just to try and get this working. I started off using the more direct method of just gotHeight = (float)data;<-- THIS IS Z and gotWidth = (float)data;<-- THIS IS X Here is my code: integer isOpen = 1; vector origScale = <8.00000, 0.06516, 4.50000>; vector origPos; string gotHeight; string gotWidth; vector desiredSize; key notecardQueryId1; key notecardQueryId2; string notecardName = "pconfig"; float String2Float(string ST) { list nums = ["0","1","2","3","4","5","6","7","8","9",".","-"]; float FinalNum = 0.0; integer idx = llSubStringIndex(ST,"."); if (idx == -1) { idx = llStringLength(ST); } integer Sgn = 1; integer j; for (j=0;j< llStringLength(ST);j++) { string Char = llGetSubString(ST,j,j); if (~llListFindList(nums,[Char])) { if((j==0) && (Char == "-")) { Sgn = -1; } else if (j < idx) { FinalNum = FinalNum + (float)Char * llPow(10.0,((idx-j)-1)); } else if (j > idx) { FinalNum = FinalNum + (float)Char * llPow(10.0,((idx-j))); } } } return FinalNum * Sgn; } default { state_entry() { notecardQueryId1 = llGetNotecardLine(notecardName, 1); notecardQueryId2 = llGetNotecardLine(notecardName, 3); desiredSize = <String2Float(gotWidth), 0.75, String2Float(gotHeight)>; if(1 == 2) { llSleep(1); llSetScale(desiredSize); llSay(0, "Projector Online 1!"); origScale = llGetScale(); origPos = llGetPos(); } else { llSetScale(<8, 0.065, 4.5>); llSay(0, "Projector Online 2!"); origScale = llGetScale(); origPos = llGetPos(); } } dataserver(key query_id, string data) { if (query_id == notecardQueryId1) { gotHeight = (string)data; } else if (query_id == notecardQueryId2) { gotWidth = (string)data; } else { llOwnerSay("ERROR! Unknown QUERY_ID. Contact the developer if you get this message!"); } } } Any help with this would be much appreciated!
×
×
  • Create New...