-
Posts
799 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by Annabell Wandsworth
-
As has already been clearly explained to you, posting the same thing in multiple forums is spamming. This is not to protect one person, but to keep the forums valuable. Instead of getting your back up, read what has been said, and learn from it.
-
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Y'all have been so helpful. It can be so frustrating trying to learn this, when there are so many things that can go wrong. I do appreciate everyone's time. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
You're right- I definitely will start adding my own comments to keep track of syntax. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
and no matter where i put it I get a syntax error -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
ok so the init() and open close() are defined outside the default state. should the timer not be defined outside the default state also? -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
I misunderstood. I thought you meant before the close of that event. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Sorry used the wrong quote. This is the right one and here is the code: timer() { llSetTimerEvent(0.0); OpenClose(); } -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
wow ok so state_entry is not a state :-) head is reeling -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
I tried putting it there and got the error "Name not defined within scope" -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
First item of confusion. So default is a state, right? So it looks like in this script there is a state within a state: default{ state_entry() { init(); } -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
I hear what you are saying about states, but I'm just trying to understand it. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
I have been using those, or I would not have gotten this far (far?? lol) -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Yes, I think I understand about default state, but there can also be different states, so I'm still a little confused and trying to learn. I do appreciate the help of everyone here. I have noticed in other posts while searching that some seem to say "just fix it!" instead of trying to understand, and I don't want to be like that. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
so inside state default but outside state entry? -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Ok, I added Love's timer event with the stuff I listed before, but I must have put (maybe the timer event) in the wrong place or way because I got a syntax error at 14,0 integer isOpen = FALSE; vector originalPos; float slideBy = 1.5; integer AUTO_CLOSE_TIME = 8; // Can be zero if no auto-close is desired init() { originalPos = llGetLocalPos(); vector size = llGetScale(); // Set up the amount to move by. Use size.y instead of size.x // if you want to slide along the y-axis. slideBy = size.x - 0.2; } timer() { llSetTimerEvent(0.0); OpenClose(); } openclose() { if (isOpen) { llSetPos(originalPos); isOpen = FALSE; llSetTimerEvent(AUTO_CLOSE_TIME); } else { llSetPos(<originalPos.x + slideBy, originalPos.y, originalPos.z>); // To move alon the y-axis, use this instead: // llSetPos(); isOpen = TRUE; } } default { state_entry() { init(); } on_rez(integer param) { init(); } touch_start(integer total_number) { openclose(); } changed(integer change) { // When the links change, reset the script // so that we pick up the changes. if (change & CHANGED_LINK) { llResetScript(); } } } -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
great, thanks. i will try to make that. -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Ok, so I add the timer event inside if (isOpen) as I wrote before, but I need to create a timer event also? -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
sorry I'm confused! -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
I've been reading some tutorials trying to understand how scripts are composed, so hopefully I can get a little farther now. You said "Where you set isOpen=true, set a timer. In the timer event, turn off the timer and call OpenClose() again." Do I put the timer event inside that event, or do I make a new event for the timer? Sorry if I am not saying this right. I appreciate your help and am really trying to learn and not just ask for a complete fix. For example, can it be this? if (isOpen) { llSetPos(originalPos); isOpen = FALSE; llSetTimerEvent(AUTO_CLOSE_TIME); } (when I define the auto close time at the top of the script) -
sliding door script- adding auto close
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Awesome I'll try that. Thanks! -
Best way to get land/house?
Annabell Wandsworth replied to MattNight84's topic in General Discussion
That was just my opinion. Many people assume at first they have to get a premium account to have a home, but I still say it's not the most cost efficient or the best way. -
Hi all I found a script that works great with linked prims, but there is no auto close. I have tried to paste in elements from other scripts for the auto close function, but I'm not a scripter so I'm missing something. I would appreciate any guidance, and thanks for your time. Here is the script: integer isOpen = FALSE; vector originalPos; float slideBy = 1.5; init() { originalPos = llGetLocalPos(); vector size = llGetScale(); // Set up the amount to move by. Use size.y instead of size.x // if you want to slide along the y-axis. slideBy = size.x - 0.2; } openclose() { if (isOpen) { llSetPos(originalPos); isOpen = FALSE; } else { llSetPos(<originalPos.x + slideBy, originalPos.y, originalPos.z>); // To move alon the y-axis, use this instead: // llSetPos(); isOpen = TRUE; } } default { state_entry() { init(); } on_rez(integer param) { init(); } touch_start(integer total_number) { openclose(); } changed(integer change) { // When the links change, reset the script // so that we pick up the changes. if (change & CHANGED_LINK) { llResetScript(); } } }
-
Best way to get land/house?
Annabell Wandsworth replied to MattNight84's topic in General Discussion
I don't think a premium membership is the best way to go, if you're doing it for a home. Those are pretty small, and honestly you can find pretty much everything you can think of as far as rentals, whether it is your own parcel or a furnished skybox cheaper than a premium membership. -
List more than 1 link in texture change script
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Thanks! Silly me, a non-scripter, thought I could just list the links in that line (which clearly didn't work)! -
List more than 1 link in texture change script
Annabell Wandsworth replied to Annabell Wandsworth's topic in LSL Scripting
Thanks, that gives me something to look up and learn.