Jump to content

Annabell Wandsworth

Resident
  • Posts

    799
  • Joined

  • Last visited

Everything posted by Annabell Wandsworth

  1. 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.
  2. 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.
  3. You're right- I definitely will start adding my own comments to keep track of syntax.
  4. ok so the init() and open close() are defined outside the default state. should the timer not be defined outside the default state also?
  5. I misunderstood. I thought you meant before the close of that event.
  6. Sorry used the wrong quote. This is the right one and here is the code: timer() { llSetTimerEvent(0.0); OpenClose(); }
  7. wow ok so state_entry is not a state :-) head is reeling
  8. I tried putting it there and got the error "Name not defined within scope"
  9. 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(); }
  10. I hear what you are saying about states, but I'm just trying to understand it.
  11. I have been using those, or I would not have gotten this far (far?? lol)
  12. 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.
  13. 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(); } } }
  14. Ok, so I add the timer event inside if (isOpen) as I wrote before, but I need to create a timer event also?
  15. 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)
  16. 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.
  17. 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(); } } }
  18. 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.
  19. Thanks! Silly me, a non-scripter, thought I could just list the links in that line (which clearly didn't work)!
×
×
  • Create New...