Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Wanted: your top 5 ways to improve scripting

Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
06-12-2003 08:26
From: someone
Originally posted by Ama Omega
Hey Wednesday, what do you mean by Simple #include? How does it differ from what I suggested? I'm just not sure I understand. :)


Just the ability to say
#include <script>

where <script> is a non-running script in the objects inventory. This would basically replace the include line with the text of the script, exactly like a C #include

This would allow one to create libraries of convienence functions that could be distributed.

Yes, this sort of thing could be done with CTRL-C, CTRL-V, but encapsulation and detail-hiding is a Good Thing.
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!
Jesse Bach
Registered User
Join date: 21 May 2003
Posts: 43
06-12-2003 10:08
I think the following would be an extremely valuable scripting related project. Open up a paid project where individuals select each function and provide simple and well commented examples of how they can be used. In real life I am a technical writer with limited C and C++ coding knowledge. I know just enough to be dangerous, or put another way just enough to want to jump in and try things. People like me look at all the raw information and it seems overwhelming as to how it all goes together. The instant we see functions interacting in simple examples it becomes usably clear immediately. What I am talking about exists already for the basics. What I am asking for is a project where a couple dozen of our best coders get paid in linden dollars for writing up examples for every event and function that will then be put into the reference.

Beta scripting for Second life has been very much like that early group of pioneers who were willing to take on the hassles of the internet and DSL. I think beta naturally brought in the first responders. Live Second Life has to get the second and third level groups feeling like they can make sense of the world and how you create within it. Current documentation just isn't going to get you there. The value for SL is you will get a much larger group of very modest coders like my self willing to try more adventurous things because it is more obvious as to how you get there. And you will pave the way for non-coders to at least give it a try.
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
06-12-2003 10:36
From: someone
Originally posted by Jesse Bach
What I am asking for is a project where a couple dozen of our best coders get paid in linden dollars for writing up examples for every event and function that will then be put into the reference.


Where would the L$ come from?

When I started the LSL help file, I was hoping people here on the forum would contribute examples, but almost no one has. Nada and I started adding a few, but we both got sidetracked by other projects.
Jesse Bach
Registered User
Join date: 21 May 2003
Posts: 43
06-12-2003 10:58
First I want you to be sure to understand I was finding no criticism in the great work that individuals have done to get documentation to where it is now. Only that much would be gained if it could be brought to the next level. Functional Specs are inherrent to all high tech startups. Real documentation is a requirement for commercial products.

Just as in real life there may be little incentive for good coders to give away their hard won expertise for free. So the answer to your question is that the Lindens should pay for it because it is THEIR product that is greatly enhanced by the work done by individuals with the hard won expertise.
Bob Brightwillow
Technologist
Join date: 7 Feb 2003
Posts: 110
06-12-2003 11:33
Jake, Nada PM'd me about contributing, and said someone will be in touch with me. I haven't heard back. I'm still keen on contributing examples, but I don't want to start coding random examples that don't fill any need. Can you point me at a to-do list or some such?
Dave Zeeman
Master Procrastinator
Join date: 28 Jan 2003
Posts: 1,025
06-12-2003 11:49
From: someone
Originally posted by Charlie Omega

How about a something like Visual Basic type interface for scripting?


That's basically the direction I was going with my "right click for constants" idea. I'm just not sure how hard that would be to impliment.
_____________________
llToggleDaveZeemanIntelligence(FALSE);
Philip Linden: Zeeman, strip off the suit!
Dave Zeeman - Keeping Lindens on their toes since v0.3.2!
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
06-12-2003 17:52
From: someone
Just the ability to say
#include <script>

where <script> is a non-running script in the objects inventory. This would basically replace the include line with the text of the script, exactly like a C #include

This would allow one to create libraries of convienence functions that could be distributed.

Yes, this sort of thing could be done with CTRL-C, CTRL-V, but encapsulation and detail-hiding is a Good Thing.
This sounds exactly like I want. I just expanded that I wanted to be able to #include and use scripts that I may not have modify access for.
Ope Rand
Alien
Join date: 14 Mar 2003
Posts: 352
06-12-2003 18:18
i wonder if they can do a #include without making the included code add to the scripts memory. that would be great.
_____________________
-OpeRand
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
06-13-2003 08:26
From: someone
Originally posted by Ama Omega
This sounds exactly like I want. I just expanded that I wanted to be able to #include and use scripts that I may not have modify access for.


Yes, I was speaking more to Alondria LeFay's point number 4, which is the idea of a shared library.
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
06-16-2003 05:13
about camera controls, even if it was just a llSetStatus(CAMERA_LOCK,TRUE) where by you could lock your camera in position until you toggled it false and it could roam free again.
_____________________
i've got nothing. ;)
Ope Rand
Alien
Join date: 14 Mar 2003
Posts: 352
06-16-2003 10:38
From: someone
Originally posted by Nada Epoch
about camera controls, even if it was just a llSetStatus(CAMERA_LOCK,TRUE) where by you could lock your camera in position until you toggled it false and it could roam free again.


yeah i agree that would be fine
_____________________
-OpeRand
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
06-17-2003 07:53
  1. Switch statement.
  2. Hash Arrays, i.e.:
    config[access][enabled]=TRUE;
    location[4] = {pos=<10, 10, 10>, name="Start"};
    etc. Like in PHP or Perl. Hashes are the bomb. You would have to figure out what to do with the current "[] means list" semantics. I would suggest nipping this in the bud. Change to "{} means list" and "[] means index into an array." Having this particular semantic backwards from the languages you are trying to emulate (i.e. C-based) is a big hindrance.
  3. Global search and replace in the editor, so we don't have to copy/paste to Notepad and change all our []s into {}s. ;)
  4. ABILITY TO WRITE NOTECARDS. For the 10th time in this thread! This is the ONLY way to do real data persistence! If a script crashes, guess what? Everything you generated is gone. The only other way to do it would be to have it llSay its entire configuration to another script on some private channel, but what happens when THAT script goes away?
  5. Per-script permissions (read/write/execute) and #include. We don't like having to no-modify our stuff to protect our scripts, because then our customers can't change the physical properties of what we sell them! No good!!!
    [/list=1]
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
06-17-2003 08:15
From: someone
Originally posted by Nada Epoch
about camera controls, even if it was just a llSetStatus(CAMERA_LOCK,TRUE) where by you could lock your camera in position until you toggled it false and it could roam free again.


wrt position or rotation (or both, or neither)?
Also, position and rotation relative to the world or to you?

I can see uses for combinations of all of the above.
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
Offline Syntax Checker & syntax coloring.
07-03-2003 14:50
Offline Syntax Checker & syntax coloring.

I mean, how can this not make the list?

Ohh! constrained motion as well as rotation by axis.

=)
Charlie Omega
Registered User
Join date: 2 Dec 2002
Posts: 755
07-04-2003 02:57
1) Offline Compiler

2) script usage *example* on mouse over.

to clarify, not just what it means but also an example script line for each entry in the dropdown menu.

3) A toggleable (allow/disallow) script example to popin the script of each menu entry in the dropdown.

example on 2 and 3: I click the list, menu shows, I mouse over llListen and this pops up in the help balloon:
llListen(0, "", llGetOwner(), "";);

Now say I want this line in the script but don't have a good short term memory and yet I want to use this line but mod it to my likeing. So in prefs I select something like #3 "use script examples"

I click llListen and this pops in the script llListen(0, "", llGetOwner(), "";); instead of just llListen

4) allow the script running processes to finishup before the save changes take effect.

Example: I am working on a rotating door and while saving the script someone comes by and clicks the door. Currently if the door is in mid turn and the script finishes saving the door stops and where it has stopped is where the script acts from.

Now it would be nice to have the door return to its idle state after the save finishes before the script's saved changes take effect instead of having to reposition the door.

Now I know I could hard code a start position in the door script so on start it "remembers" the desired start position, but some scripts other than doors are a bit more complex than this.

5) Script to script ie: object to object IM's (been suggested b4 but keeping the dream alive :-)
_____________________
From: 5oClock Lach
With a game based on acquiring money, sex, and material goods, SL has effectively recreated all the negative aspects of the real world.


Mega Prim issues and resolution ideas....
http://blog.secondlife.com/2007/10/04/second-life-havok4-beta-preview-temporarily-offline/
Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
07-04-2003 07:03
I'm getting the hang of scripts pretty good.
So far I'll add these as my wish list:

1 - lists in a list
2 - making joints from inside a script
3 - writing and reading notecards
4 - rezing objects with more than an integer param
5 - functions to affect an objects hollowness, start/end, and all other attributes that are currently missing.

Edit:

Oh and #include and update one script affects all copies. Those are great ideas. Darn now I have 7 :p
_____________________
Madox Kobayashi

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-04-2003 09:36
two things, madox ;)

3. we can read from them already :-)

4. make it so the rezed object accepts inventory drops, pass it a card, have the parameter be the cardline that the object needs to read.
_____________________
i've got nothing. ;)
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-04-2003 10:20
From: someone
4. make it so the rezed object accepts inventory drops, pass it a card, have the parameter be the cardline that the object needs to read.
God is that an ugly work around!
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-04-2003 10:22
heh it is either that or have it listen to the parameter channel and have the rezzer speak on said channel.

btw, i want it as well, just saying that it can be done.
_____________________
i've got nothing. ;)
Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
07-04-2003 10:29
Haha Nada!

I figured the passing a chat channel as the integer, but passing a notecard and telling what line to read is genious! Haha. Pretty much worthless when it comes to being practical (and when you can use a chat channel) but I like how you think :p
_____________________
Madox Kobayashi

Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
07-04-2003 15:26
we all do, why do you think he has so many posts?

Enlightening the unenlightened in the scripting forum!
Zypher Crash
Charter Member
Join date: 17 May 2003
Posts: 55
07-09-2003 07:33
This is not rilly a command but more less a feture request,

The ability to turn on/off a default script within your setting to be placed in all your objects.

EXP: a script that will delete all items owned by you, that are over a spacific altitude, and/or delete an item after 24hr passing if its not on your owned land.

Or not deleted but placed in your lost n found, upto the script you pick to be your default script of choice IF enabled.

--------------------------------------------------------------------

I dunno what this is called but I used it alot in mIRC (((ALOT))) as: /set

Example: Trying here not shure.

||set(string,what to set it as)

||set switch1 lookon

if (switch == null){ ||set switch1 lookoff }
elseif (switch == lookon){ bla bla bla

Variables are temporary storage areas to which you can assign values which you can use later in your scripts.

I think what i mean is a more versitile set command. the ones currently are to constrictive.
_____________________
Anything I'v posted was not posted to soley point someone out nore discredit any persons mentioned. The Above is soley my own oppinion that witch I am entitled to. Any flame or comments welcome But will be ignored. Unless specified other.
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-09-2003 09:30
I personally am confused by your second request. The scripting language has variables and many good ways to store things in them. Are you asking for defines or constants?
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
07-10-2003 14:36
From: someone
I dunno what this is called but I used it alot in mIRC (((ALOT))) as: /set

Example: Trying here not shure.

||set(string,what to set it as)

||set switch1 lookon
[/B]
If you don't know how to create variables, let alone that they exist, I think you need to read the LSL documentation. By the way, it isn't || (two pipes), it's ll (two Ls).
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
My list
07-13-2003 10:01
All of these have been mentioned by others, I'm just adding my vote(s)

1) script libraries
2) script permissions/ownership
3) Create/Alter notecards
4) set "constants" from a pie menu
5) switch-case


6) docs. Please. Word/RTF printable & .CHM

--
Grim
1 2 3 4 5 6 7 8 9 ... 15