![](http://content.invisioncic.com/Mseclife/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Kipz Arado
Resident-
Posts
10 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by Kipz Arado
-
Hey all, So, my C Drive is an SSD with not a lot of space left, but I have a pretty much open 2 TB D Drive. I was wondering, is it possible to relocate everything of SL onto the D drive because I would like to install it there. I can install the viewer to the D drive, go inside SL and set the cache folder there as well, however, there is still the Second life folder in the users\roaming\secondlife path that I would like to move as well. I was wondering, is this possible, and if so, how? I assume this is the last folder I have to relocate as well? Thank you for all feedback : )
-
Thank you guys for taking the time and efforts to post replies and help me out . I've learned a lot and on my "quest" to become a better scripter I have been trying to do everything as "efficient" as I can get it. I've been scripting off and on since 06, and no matter what where, when, or what I was scripting, one thing i've always heard that I should be doing, is making the script as efficient as possible to cut down on sim lag and everything else. With that being said, that is why I approached my elevator script the way that I did, with linked message, and making sure if i name a prim a certain way, it will use a height from a list etc.. I also wanted to link the control to the door so it could use "unlock" and "lock" linked messages. I did all of that in hopes that my scripts could use the least amount of listener script as possible, to once again, be efficient. I could have easily had all of my doors working by now by using a region listen or what ever the case may be to have the doors than rotate and what not. I will probably end up doing that, I was just wondering if there were really easily 1 or 2 line changes i could have made to my scripts to fix them. Like something I was over looking. I just didn't want to feel like a "noob" persay, by using llListen(). Once again, thank you guys for the replies!!
-
I know an elevator and a door are two completely different things, but I have questions concerning two seperate scripts and thought I'd spare the forums some spam by making two individual threads. Anyways, I know to post on here a lot, but I've recently taken an extended break from Second Life, coming back to the game recently, I've decided to build a new house ground up with a friend of my mine. I've been looking to use some scripts that I have already created in the past so I wouldn't have to reinvent the wheel persay, and I've been having some problems getting them to work correctly. To get onto the scripting, my first question will be about my "Home control device" This is a display that I setup on my home wall, and I can click buttons to lock / unlock doors, along with tint windows etc. Anyways, I used the freebie "Deluxe Door Script" and modified it to lock and unlock through linked messages when the HUD is touched. The door works perfectly fine when it's only linked to the hinge and door knobs / decorative prims attached to the door. However, when I link the door to my Home Control Display, only the hinge will rotate.When I asked how to fix this before I took my break previously, I was told to taper a simple prim door and it'll work with my script. I remember doing that, but I'm looking for a more complex door this time around, that's not a simple prim. integer lock = 1; // ********** SETTINGS HERE ************ float TIMER = 30.0; // automatically close the door after this many seconds, // set to 0 to disable automatic closing integer DIRECTION = 1; // direction door opens in. Either 1 (outwards) or -1 (inwards); float VOLUME = 0.8; // sound volume, 1.0 loudest, 0.0 to disable sound // ********** END OF SETTINGS ********** key SOUND_OPEN = "cb340647-9680-dd5e-49c0-86edfa01b3ac"; key SOUND_CLOSE = "e7ff1054-003d-d134-66be-207573f2b535"; vector gPos; // door position (objects move a tiny amount // away from their position each time they are rotated, // thus we need to workaround this by resetting // the position after rotating) door(integer open) { if (open) { llTriggerSound(SOUND_OPEN, VOLUME); llSetLocalRot(llEuler2Rot(<0, 0, -DIRECTION * PI_BY_TWO>) * llGetLocalRot()); } else { // close llSetLocalRot(llEuler2Rot(<0, 0, DIRECTION * PI_BY_TWO>) * llGetLocalRot()); llTriggerSound(SOUND_CLOSE, VOLUME); } } default { // first time startup state_entry() { gPos = llGetPos(); // remember where we're supposed to be door(TRUE); state closed; } } state closed { // door is closed on_rez(integer start_param) { gPos = llGetPos(); } state_entry() { door(FALSE); } link_message(integer sender_num, integer num, string str, key id) { if(llToLower(str) == "lock") { lock = 1; } if(llToLower(str) == "unlock") { lock = 0; } } touch_start(integer total_number) { if( lock == 1) { llSay(0,"This door is currently locked."); } else if (lock == 0) { state open; } } moving_end() { // done moving me around, store new position gPos = llGetPos(); } } state open { // door is open on_rez(integer start_param) { gPos = llGetPos(); state closed; } state_entry() { llSetTimerEvent(TIMER); llSetPos(gPos); // rotation drift workaround door(TRUE); } link_message(integer sender_num, integer num, string str, key id) { if(llToLower(str) == "lock") { lock = 1; } if(llToLower(str) == "unlock") { lock = 0; } } touch_start(integer num) { state closed; } timer() { // auto-close state closed; } moving_start() { // close when being moved state closed; } state_exit() { llSetTimerEvent(0); } } That would be the door script. This second script down below is my elevator script, well apart of it, and How i've scripted it would be I have a list, and the first number in the list is the first height, second number in list is second height, so on and so forth. When i make buttons labeled as 1,2,3,4 it goes to the corrisponding height. That would perfectly fine because the buttons would be attached to the elevator... I was wondering, how would I go about making a recall button.... because if I link the recall button to the elevator, they will move with it... lol touch_start(integer num_detected) { integer num = (integer) llGetLinkName(llDetectedLinkNumber(0)); if(num != 0) { vector pos = llGetPos(); if(llList2Float(floor_heights, num - 1) != 0) { stop(); target_pos = <pos.x, pos.y, llList2Float(floor_heights, num - 1)>; target = llTarget(target_pos, .1); llSetStatus(STATUS_PHYSICS, TRUE); llMoveToTarget(target_pos, speed); } } } I apologize in advance for the obnoxiously long wall of text, and flood of information. I have 2 seperate questions as I stated before, and would rather make 1 thread than 2. Thank you so much in advance for any help!!!!
-
if(llToLower(llGetSubString(msg,0,5))=="timer ") { lol = llGetSubString(msg,6,-1); llOwnerSay("Particles will poof every : " + lol + " seconds"); } So, I've been trying to create a poofer, which is basically an object that "shoots" particles out of it at set intervals. I was wondering if there is a way to make it so the script detects my variable "lol" and makes sure it is a float or integer. This will allow way more customization then stacking if statements ontop of one another basically saying "if owner says 30, itll be set to 30 seconds, if owner says 20, itll be 20 seconds" etc... This will allow them to say 24.5 seconds if they really wanted to. The problem I have with this is you can say "timer cat" and then the particles stop coming out because in the particle system it's looking for a time of cat, which obviously isn't realistic. is there a way I can make the script filter out what would actually be an integer or float, and otherwise say "thats not a viable input" or something along that line? Thank you so much in advance for any questions and advice!
-
As i've been posting in my previous threads about helping my friend with the scripting on his house for his newly purchased land, I have been working on my on going attempt to learn LSL by building him a controller to control the window tinting and locking of doors via buttons. Thank you to several contributors I have successfully set up the Texture to respond to llDetectedTouch, and I have my windows fully tintable and working. I also have my doors locking and unlocking.. THE ONLY problem I have left is my door functions perfectly normal when it is not linked to my home controller. When I make an attempt to link my Hinge and the door itself, to my controller prim, the hinge on the side of the door with rotate with the Z-axis in the middle of the prim. Not only is this NOT the way a normal door rotates, the fact that the hinge is also the only thing that rotates. Could anyone please help me modify my script below to fix this? if (llGetLinkName(llDetectedLinkNumber(0)) == "DOOR") { integer i; for (i=2;i<=llGetNumberOfPrims();++i) { if (llGetLinkName(i) == "DOOR") { --- This following code above, I've located from Rolig's Mulit-prim linked sliding door, and I've tried several times to impliment the theory into my door, unfortunately I can't get it to work correctly. The door works if it's not linked to my controller,but then it wont receive the linked message to lock and unlock o.O integer lock = 1; // ********** SETTINGS HERE ************ float TIMER = 30.0; // automatically close the door after this many seconds, // set to 0 to disable automatic closing integer DIRECTION = 1; // direction door opens in. Either 1 (outwards) or -1 (inwards); float VOLUME = 0.8; // sound volume, 1.0 loudest, 0.0 to disable sound // ********** END OF SETTINGS ********** key SOUND_OPEN = "cb340647-9680-dd5e-49c0-86edfa01b3ac"; key SOUND_CLOSE = "e7ff1054-003d-d134-66be-207573f2b535"; vector gPos; // door position (objects move a tiny amount // away from their position each time they are rotated, // thus we need to workaround this by resetting // the position after rotating) door(integer open) { if (open) { llTriggerSound(SOUND_OPEN, VOLUME); llSetLocalRot(llEuler2Rot(<0, 0, -DIRECTION * PI_BY_TWO>) * llGetLocalRot()); } else { // close llSetLocalRot(llEuler2Rot(<0, 0, DIRECTION * PI_BY_TWO>) * llGetLocalRot()); llTriggerSound(SOUND_CLOSE, VOLUME); } } default { // first time startup state_entry() { gPos = llGetPos(); // remember where we're supposed to be door(TRUE); state closed; } } state closed { // door is closed on_rez(integer start_param) { gPos = llGetPos(); } state_entry() { door(FALSE); } link_message(integer sender_num, integer num, string str, key id) { if(llToLower(str) == "lock") { lock = 1; } if(llToLower(str) == "unlock") { lock = 0; } } touch_start(integer total_number) { if( lock == 1) { llSay(0,"This door is currently locked."); } else if (lock == 0) { state open; } } moving_end() { // done moving me around, store new position gPos = llGetPos(); } } state open { // door is open on_rez(integer start_param) { gPos = llGetPos(); state closed; } state_entry() { llSetTimerEvent(TIMER); llSetPos(gPos); // rotation drift workaround door(TRUE); } link_message(integer sender_num, integer num, string str, key id) { if(llToLower(str) == "lock") { lock = 1; } if(llToLower(str) == "unlock") { lock = 0; } } touch_start(integer num) { state closed; } timer() { // auto-close state closed; } moving_start() { // close when being moved state closed; } state_exit() { llSetTimerEvent(0); } }
-
I want to start out by saying thank you to everyone for taking the time to respond to my question and help me with this situation. Like I've said before, I could have been done with this project hours ago if I would have just put invisible cylinders over my textuer and used link messages. However, I am looking to do the best job that I can on all projects that I do. I'm sorry if I ask anything incredibly stupid or say something that does't make a lot of sense. I've understood exactly what I have to do, i guess the only problem I have is writing the "formulas" and just making sure the code itself is correct. That script you posted Rolig has been exactly what I was getting at, with you click within a certain area, and It lets me know what area I've clicked. Once again, the only problem I seem to have is with these formulas. Such as why float X = Spot.x - 0.5; float Y = Spot.y - 0.5; if ( (llSqrt(X*X + Y*Y)) <= 0.2) is the center of the face. My buttons are round, so I guess the easiest way for me to go about doing this would be get a simple llDetectTouchUV script on the wiki that spits on where i've clicked. Find the coordinates for the center of button 1, then change the spot.x, spot.y and radius to the size of the button painted on the texture? Or is that Still wrong? I'm sorry if you have to hold my hand through this, my brain is just being melted and I'm trying my best. lol
-
Thank you both for the fast and helpful replies. Like I said, I come and go with my scripting habits and learning process. Half of my question was pretty much which llDetect function I would use, which was answered, Thank you . I've known how to do the: touch_start(integer UV_detected) { integer i = 0; for(; i<UV_detected; ++i) llWhisper(0, "UV clicked: " + (string)llDetectedTouchUV(i)); } That would be amazing if my button was the side of that VERY VERY small point in which i've clicked on. However, that is not the case with my buttons, and my question was, could anyone point me in the right direction on how to make a parameter type thing, such as a big sqaure type "radius" or "area" in which I if any point clicked in that area/radius, it clicks on the "button" painted on my texture? Would it be something along the lines of touch_start(integer total_number) { vector UV = llDetectedTouchUV(0); float U = UV.x; float V = UV.y; if(float UV.x = 2 - 4 & UV.y = 1-3) { click on button } } And another thing with my if statement is i dont know the correction operation for "through?" would i have to use greater than less thans? I am just wondering If i am approaching this the right way, and i apologize if I'm confusing . Thank you so much again!
-
Soo, Even though I'm a beginner scripter, and have been "dipping" into it for years now. I have this "perfectionist" side of me, that refuses to do anything half ass. With that being said, this is kind of my downfall when it comes to doing scripts and learning, considering the fact that I don't know what I'm doing half the time. Anyways, with all that being said, I'm still helping my friend script objects he is building on all the land he bought about a week ago. In continuation to the Home Controller I am making him in reguards to his doors, and windows, I wanted to make an appealing GUI via photoshop instead of making tons of buttons on a wall for him to click on. I could always make invisible prims and place them over my photoshoped image with buttons on the texture. However, isn't there a llDetectedTouchFace or similiar function that divides the prim into numbered "sections", when you can click directly on the prim? My question is, how would one go about making the script detect a range of sections which would technically be one button when you look at the texture. Once again, I apologize for the paragraph and "Wall of Text". Thank you! :D :D
-
Thank you so much for the reply! Yeah, I've wanted to go with link messages the most I possibly could. I'm glad to hear that listener scripts won't be THAAT bad if they are filtered properly. Would it be possible to have doors still open and close while being linked to the button on a wall. Last time I checked, a rotation function will rotate the root prim, unless I just did it wrong, which was very possible. I also know exactly what you mean when it comes to the order of linking prims. I did that for a HUD, and the second to last linked prim did this when touched.. etc.. but itll be way to hard for a large home always changing.
-
So I've been playing SL since the beginning of 06, and i've been off and on with scripting. Most of the time I do minor things like scripting things for friends, customers, and just anyone really. However, to keep my question short, recently my friend and I have decided to go out and buy a quarter of a sim. Anyways, my friend built himself a house, and he was wondering if i could script him some buttons that he could click on to manage different settings in his house, be it the opacity of the windows, or the locking of a few doors. To get to my question, I know one of the most important things in reguards to scripting would be the efficiency of it. I could easily script this several different ways, but to not be a "noob" about it, how would be the best way to make all of these object communicate with each other? I could use Linked Messages but the items would have to be linked, what if he has a big house too big to link everything together? I thought.. I could use listener scripts, I don't want listener scripts all over his house, the sim wouldn't like me very much. Is there possibly another way that I am forgetting? I am also sorry for the wall of text for a fairly simple question.