Jump to content

Requesting LSL Group


EvelynBianchi
 Share

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

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

Recommended Posts

If you are learning to script in LSL and want to ask other scripters for help in solving some scripting challenge, you are always welcome to post questions right here.  You'll find that you get the best responses if you ask well-focused questions and can post a copy of your work, rather than simply saying, "Something's wrong.  My script doesn't work."  Most of us learned LSL right here, from other residents with more experience and a lot of patience.  We're glad to pay back their kindness by helping new scripters ourselves. 

As with any scripting group, you'll find that most people are reluctant to simply hand you working code.  That's not the purpose of this forum.  We're here to help you learn how to write code yourself, so although we will rarely post a finished version of your script, we will often provide snippets or examples that you can learn from.  (Your question may sometimes prompt a discussion or disagreement among us, which can be truly instructive -- or confusing -- if you take the time to follow it.) You may also find that other people have asked your question before, so a little judicious searching may turn up clues.

Link to comment
Share on other sites

Thank you for responding, Rolig Loon! :smileyhappy: Yes, I am new to LSL and also SL in general. I've no issue learning LSL (I have experience in various programming languages.) I'm merely searching for a group within SL that I may chat with about scripting in whole as I explore SL. I've joined a few groups, but none respond when IM'd a simple greeting. :smileysad:

Link to comment
Share on other sites

That's likely to be the case. The groups that I am aware of tend to be quiet most of the time. (EDIT: Innula is right, though.  Check out the ones she suggests.) This LSL Forum is probably your best bet.  It's the most active of the Creation forums, and generally quite responsive.

FWIW, many of the scripters I have known in world had no programming experience before coming to SL.  Others, like you and me, had prior experience with other languages, but not as professionals in RL.  A small subset are active programmers in RL.  It helps to have some basic understanding of what a scripting language does, but I have found that some experienced programmers have a bit of culture shock when they step into LSL.  The notion of events and states is unnerving, I guess.  It's also unsettling to find that there is no official guide to the language.  The wiki is it.  Everything that we know about LSL has been distilled from the experience of users and laid out in the LSL wiki.  It's an invaluable guide, but one that makes more sense after you have done a lot of digging around.  Wine helps too.

As Steph suggests, there are some books on the market.  They tend to go out of date quickly because LSL keeps evolving in a random walk sort oif way, but they aren't a bad way to get into the basics of LSL.  The tutorials in the wiki are also a nice way to start, but they don't take you much farther than you can go in an afternoon.  As you may have found with other languages, the best way to learn is to take scripts that already work --- the Examples in the wiki, for example -- and take them apart to see how they tick.  Be fearless.

Link to comment
Share on other sites


EvelynBianchi wrote:

I've joined a few groups, but none respond when IM'd a simple greeting. :smileysad:

Ah.   Most scripting and building groups -- at least the ones to which I belong -- don't normally respond to simple greetings.

The protocol is usually just to dive straight in with a question, and if you have some code you want people to see, it's generally considered good practice to post the code in pastebin.com and drop in the url rather than spamming people with lots of code.

The reason for this is that busy working scripters aren't usually going to break off to respond to a simple greeting in a group (otherwise we'd never get anything done) but will gladly help out when people have specific questions.

Certainly that's the case in the three groups I recommended.

Link to comment
Share on other sites

The main problem i found with the wiki is it does not exactly tell one what is happening, very frustrating if one has no clue about code. The otther problem is most of the full examples are full of bugs or do not work at all. I also still do not understand why you put the increment outside the if and else if. block.

integer start_param;default{	touch_start(integer num)	{		if (!start_param)		{			llRezAtRoot("MyObject",llGetPos(),ZERO_VECTOR,ZERO_ROTATION,start_param);		}		else if (start_param > 0)		{			llSay(0,"Sorry, I have already rezzed the object once.");		}		++start_param;// why is it here?	}}
Link to comment
Share on other sites

In that example, start_param is going to be 0 the first time the script runs.   The script rezzes an object if start_param == 0 (so the first time it runs) and then increases the value of start_param by one.   This means it rezzes the object once but never again.  

You could put ++start_param  inside the first if statement if you wanted to, instead, so something like

	touch_start(integer num)	{		if (!start_param)		{			llRezAtRoot("MyObject",llGetPos(),ZERO_VECTOR,ZERO_ROTATION,start_param);			++start_param;		}		else if (start_param > 0)		{			llSay(0,"Sorry, I have already rezzed the object once.");		}			}

and it would have the same effect, but I don't think it makes much difference. 

Link to comment
Share on other sites

You are correct.  It increments each time the object is touched, whether it's just rezzed something or not.

I agree, it seems pretty pointless to incrememt the counter each time, since the only test in the script is whether the counter ==0 or not, but that doesn't affect the way the script works.

 

 

Link to comment
Share on other sites

True, but that example is taken out of context.  The question you posed in that thread was, "How can I prevent the rezzer from rezzing more than one object?" The solution is to include a global flag of some kind in the touch_start event and then increment that flag as soon as someone touches the object.  In that context, it doesn't make any difference whether you increment the flag inside the first if test or at the end of the event.  In either case, it is incremented as soon as someone touches the object.  If you put the flag inside that first test, it will only increment once -- the first time someone touches. If you put it at the end, it keeps on incrementing with each touch, but has the same effect on the overall logic.  The only advantage of putting it at the end is that it gives you the option of adding another statement right after it ...

llOwnerSay("The rezzer has been touched " + (string)start_param + " times.");

to help you keep track of how many times someone has clicked on your rezzer, if you care about such things.

  • Like 1
Link to comment
Share on other sites

Again, this example is out of context in the original thread. The variable called start_parameter is simply a flag that could have been called anything -- "count", "done", "chickpea" ..... The rezzed object won't be using it for anything, so it's a dummy variable.  Letting it serve double duty as a flag in the touch_start event saves creating another integer variable for that purpose.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2583 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...