Pedlar Decosta Posted April 14, 2018 Share Posted April 14, 2018 How does one go about adjusting the parameter 'path cut' beginning and end of a prim using a script ? I can see 'slice' on the llSetPrimitiveParams() list but not path cut. I am wanting to drop the script into a box prim and cut the path to 0.3750 & 0.8750 (or similar) to make a single prim swinging door. Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted April 14, 2018 Share Posted April 14, 2018 (edited) it is the second parameter after flagging what PRIM_TYPE it is. vector cut for a box, it would looks something like llSetPrimitiveParams([PRIM_TYPE,PRIM_TYPE_BOX,PRIM_HOLE_DEFAULT,<0.375,0.875,0.0>,0.0,<0,0,0>,<0,0,0><0,0,0>]); Edited April 14, 2018 by Ruthven Willenov 1 1 Link to comment Share on other sites More sharing options...
Pedlar Decosta Posted April 14, 2018 Author Share Posted April 14, 2018 Ah yes. Thank you very much. I knew it had to be somewhere Link to comment Share on other sites More sharing options...
Pedlar Decosta Posted April 14, 2018 Author Share Posted April 14, 2018 In case anyone wants a script to make a single prim swing door (probably nobody because it is easy to do it manually). Drop it in a prim and afterward it deletes itself. vector cut = <0.3750,0.8750,0.0000>; float hollow = 0.0000; vector twist = <0,0,0>; vector top_size = <1.0000,1.0000,0.0000>; vector top_shear = <0,0,0>; default { state_entry() { llSay(0, "Making a single prim swing door shape!"); vector pos = llGetLocalPos(); llSetPrimitiveParams([9,PRIM_TYPE_BOX, PRIM_HOLE_DEFAULT, cut, hollow, twist, top_size, top_shear ]); llSetScale(<0.10000, 3.00000, 3.00000>); llSetPos(<pos.x, pos.y, pos.z+1.5>); llSleep(2.0); llSay(0,"Finished ! Door is ready for swing script ! Deleting this script now."); llRemoveInventory(llGetScriptName()); } } Link to comment Share on other sites More sharing options...
Pedlar Decosta Posted April 24, 2018 Author Share Posted April 24, 2018 (edited) I was thinking about adding the above code into a swing door script. However you wouldn't want to do it automatically every time the script is reset. So a dialogue panel would give the user the choice whether to cut the prims path or not. But it would be best if it only showed the dialog the first time the script was put into a prim. So that is my question; what is the best way to get a script to present a dialogue panel the first time only the script is put into the prim ? I thought of using either the description box or the name box to see if it was a newly created prim, and if so to run the routine/code, but that wouldn't always be the case. Some builders might be using prims that have already been named. By parsing the name or description boxes I could add a label to get around that - list list1 = llParseString2List(llGetObjectDesc(), ["."],[]); string 1stHalf = llList2String(list1,0); string 2ndHalf = llList2String(list1,1); if(2ndHalf =="label") { // don't show dialog } However the builder may not want to have their names or descriptions changed. So are there any other methods to tell if it is the first time a script has been inserted into a prim ? Edited April 25, 2018 by Pedlar Decosta Link to comment Share on other sites More sharing options...
Innula Zenovka Posted April 25, 2018 Share Posted April 25, 2018 How about first using llGetLinkPrimitiveParams, to determine whether or not the prim is already pathcut? If it's not, offer to pathcut it. If it is, do nothing. Or, if it's a stand-alone script, then call llRemoveInventory(llGetScriptName()) once the script has done its stuff (or the owner says "No" to the dialog asking if the owner wants the prim pathcut? 1 Link to comment Share on other sites More sharing options...
Pedlar Decosta Posted April 25, 2018 Author Share Posted April 25, 2018 The get params option is a great idea and worth thinking about. I already have a standalone script that cuts it and then deletes itself, but it is still a good idea too. Thanks Innula Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now