Jump to content

Curtain Remote Script


Natalia Renilo
 Share

You are about to reply to a thread that has been inactive for 4166 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I was wondering if someone could help me with creating a remote control for this curtain script:

 

//When touched the prim is retracted towards one end and when touched again stretched back out.
//
//Prim moves/changes size along the local coordinate specified in the offset vector below.
//
//To change the overall size, edit the prim when stretched out and reset the script when done.
//
//The script works both in unlinked and linked prims.
//
// Copyright (C) 2008 Zilla Larsson
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License version 3, as
//    published by the Free Software Foundation.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>
 
 
vector offset = <0,0,-1>; //Prim moves/changes size along this local coordinate
float hi_end_fixed = FALSE; //Which end of the prim should remain in place when size changes?          
                            //The one with the higher (local) coordinate?
float min = 0.4; //The minimum size of the prim relative to its maximum size
integer ns = 10; //Number of distinct steps for move/size change
 
 
default {
    state_entry() {
        offset *= ((1.0 - min) / ns) * (offset * llGetScale());
        hi_end_fixed -= 0.5;
    }
 
    touch_start(integer detected) {
        integer i;
        do  llSetPrimitiveParams([PRIM_SIZE, llGetScale() - offset,
                PRIM_POSITION, llGetLocalPos() + ((hi_end_fixed * offset) * llGetLocalRot())]);
        while ((++i) < ns);           
        offset = - offset;
    }
}

 

Thank you :)

Link to comment
Share on other sites

How remote?  So remote that you can't just touch it? You could go to all the trouble of turning the touch_start event into a listen event and then writing a script for another object that yells "OPEN!" when you touch it, but that seems like overkill when you can already open the curtain with a simple mouse click.

  • Like 1
Link to comment
Share on other sites

Sorry. I wasn't trying to be rude OR talk down to you.  I told you how to do what you wanted to, but you never mentioned controlling a group of curtains.  If you want to control several, you'll need to simply write a dialog script that sends that OPEN message (or CLOSE message ) to a different curtain depending on your dialog choice.  So, the functions you'll need in your controlling script are llDialog and llRegionSayTo .  If you've never written a dialog script before, there's a fairly nice tutorial at http://wiki.secondlife.com/wiki/Dialog_Menus .

  • Like 1
Link to comment
Share on other sites

It's all in how you hear.  You asked for advice without mentioning the real purpose, so I told you how to do the simple job and advised that it wasn't truly necessary to go to all that trouble.  When you added the information that there was more than one curtain, I told you how you'd probably have to handle that part too, and pointed you to a tutorial.  I'm glad to hear that you found someone nearby to help.  Good luck.  :smileywink:

  • Like 1
Link to comment
Share on other sites

Seems the forum buddies are teaming up.

 

The comment that was unnecessary:

How remote?  So remote that you can't just touch it?   That was condescending

 

People come here asking for help.

I'm sure you are all superior scripters but to make the ones that aren't look imbecilic does not help it hurts.

 

I wanted a way to make it remotely controlled even if it is just one curtain that can be closed with a click of a mouse. If she stated her second post then there would be no problems.

Thanks for the support of a "lowly, uneducated" scripter.

Link to comment
Share on other sites

Gosh, I haven't logged in for I don't know how long. It took seeing a second person (in like a week!!!) go on the offensive with one of the two most helpful and knowledgeable people I've kept up with in SL scripting forums. The other person, well she left, now only to be found on slu. What is wrong with people these days!

Rolig was NOT rude. Who ever said that, I second it. If you have insecurities about your scripting skills, this is the place, the place, to set them aside. People like Rolig are exceptionally generous and spend uncounted hours helping others, like you, with particulars of lsl. If you perceived rudeness, you were most definitely, emphatically, projecting your own tendencies.

Link to comment
Share on other sites

I personally see how she can be offended.

 

Not everyone is on high level of scripting and to made feel like they are inferior makes people want to leave SL and not even try to learn.

 

SL Is a place for people to come together not be divided.

 

If you ever need help in scripting please IM me in-world.

 

-Muah <3

 

 

  • Like 1
Link to comment
Share on other sites


Natalia Renilo wrote:

A lot of stuff that is taking umbrage...for no reason


Natalia, Rolig was not rude or condescending.  How you've managed, to perceive her helpful questioning as such, is a mystery. 

 

Rolig has a wealth of scripting knowledge, and not only volunteers here to help people, but also gives of her time and knowledge to people in various groups inworld.  Truly, one of the most helpful people you will have the luck to encounter. 

If I were you, I'd swallow that pride, and offer her an apology.  

 

(Yes, ohn...there once was another such helpful person here...now gone.  *le sigh*) 

Link to comment
Share on other sites


Quenida Quan wrote:

Okay time to leave the girl alone.

 

She got the help she needed.

 

Move on.

She needs more help than anyone here can give her, and so does anyone else who interprets a polite request for clarifcation as offensive.  Life must be very tough, huh?

Link to comment
Share on other sites


Quenida Quan wrote:

Wow.

 

I am really amazed by the bashing of this girl.

 

Makes me glad I keep out of the forums. I would hate to have a problem and have this happen to me.

The only problem is that you and your alt respond to polite requests for clarification with insults and abuse. Let us hope both of you stay out of the forums.

Link to comment
Share on other sites


Quenida Quan wrote:

I personally see how she can be offended.

 

Can you?  Not me. Let's just recap.  The "offensive" words were this request for clarification about distance:

 

"How remote?  So remote that you can't just touch it?"

 

To which your alt responded:

 

"No need to be rude or talk down to me. I was just asking a question, THANKS."

 

To which Rolig responded:

 

"Sorry. I wasn't trying to be rude OR talk down to you.  I told you how to do what you wanted to, but you never mentioned controlling a group of curtains.

 

To which your alt responded:

 

"Already gotten help from someone else who doesn't have a smart alec attitude 

 Thanks for the morning abrasiveness."

 

AND

 

"The comment that was unnecessary:

How remote?  So remote that you can't just touch it?   That was condescending"

 

So, yes, if you intend to come here, ask questions, and then abuse and insult those who are kind enough to politely share their expertise -- just don't.

Link to comment
Share on other sites

Ladies, please stop. This is a scripting forum, and we all have better things to do than trade spitballs across the table.  There's no need to escalate a small misunderstanding into something we would all be embarrassed to explain to our mothers.  :smileyembarrassed:

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4166 days.

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
 Share

×
×
  • Create New...