Originally posted by Grim Lupis
6) docs. Please. Word/RTF printable & .CHM
6) docs. Please. Word/RTF printable & .CHM
There is a user-created .chm here:
/invalid_link.html
Newest version is at the bottom of the thread
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
|
07-13-2003 12:04
Originally posted by Grim Lupis 6) docs. Please. Word/RTF printable & .CHM There is a user-created .chm here: /invalid_link.html Newest version is at the bottom of the thread _____________________
Sarcasm meter:
0 |-----------------------*-| 10 Rating: Awww Jeeze! |
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
|
Re: Re: My list
07-13-2003 14:36
[QUOTEThere is a user-created .chm here:
/invalid_link.html[/QUOTE] I've already found that and have a copy, thanks. But, it's still incomplete and doesn't have implementation examples for all functions, which what I assumed others meant here when they talked about complete documentation. And there are some ambiguous references, as well. For instance: ------------------------------ llRezObject llRezObject(string name, vector pos, vector vel, rotation rot, integer param); Creates an instance of the specified inventory object at position pos with velocity vel and rotation rot. The created object must have the "Physics" box checked on its property page in order for the velocity to apply. The created object’s on_rez() event handler is invoked, and the param argument is passed to it. ------------------------------ Does these mean the object's inventory or my avatar inventory, or either?? What are pos and rot relative to? (The object, the sim, the world, the owner, the target?) To you it may be perfectly clear. I, however, have been in-world for two days. It's not so clear to me. Considering the lag caused by out-of-control scripts and the potential to crash the sim, it would be preferable for me to have good docs than to learn everything by experimentation. I realize the fact that the current help file's condition isn't the fault of the authors. It's not their job, they're doing it out of the kindness of their hearts, and they do have other things to do in their FL than make my life easier. Which is why I'm requesting that LL actually take responsibility and maintain such a document instead. -- Grim |
Nada Epoch
The Librarian
![]() Join date: 4 Nov 2002
Posts: 1,423
|
07-13-2003 15:16
woohoo some good criticism!!! hey grim would you mind picking through the doc and either emailing me at nada@badgeometry, or send me an im in world about all the stuff that needs clarifing? or... what would be even better is if you started a thread that had all this in it, then other people could add their comments as well. we need some fresh blood to look at it and tell us what it needs. heh we are too close, so we need some pointers
![]() _____________________
i've got nothing.
![]() |
Nada Epoch
The Librarian
![]() Join date: 4 Nov 2002
Posts: 1,423
|
Re: Re: Re: My list
07-13-2003 15:34
Originally posted by Grim Lupis ------------------------------ llRezObject llRezObject(string name, vector pos, vector vel, rotation rot, integer param); Creates an instance of the specified inventory object at position pos with velocity vel and rotation rot. The created object must have the "Physics" box checked on its property page in order for the velocity to apply. The created object’s on_rez() event handler is invoked, and the param argument is passed to it. ------------------------------ Does these mean the object's inventory or my avatar inventory, or either?? What are pos and rot relative to? (The object, the sim, the world, the owner, the target?) To you it may be perfectly clear. I, however, have been in-world for two days. It's not so clear to me. Considering the lag caused by out-of-control scripts and the potential to crash the sim, it would be preferable for me to have good docs than to learn everything by experimentation. pos is related to the world/sim coordinates, and you are limited to a ten meter radius from the rezzing object. Setting a rotation is always related to the world axis. (there are ways around this, rotation math lets you determine what the needed rotation is to rotate it about its local axis) i will say i did run into a problem last week where an object had been put into another object already rotated, and when it came out, we couldn't get it to set the proper rotation. needs more testing though. _____________________
i've got nothing.
![]() |
Accent Godel
Registered User
Join date: 1 May 2003
Posts: 7
|
07-13-2003 16:55
If you give a script via llGiveInventory, it is off by default in the recieving primitive object. It is also not possible to turn on that script via LSL. The llSetScriptState function simply fails in this circumstance.
I had a set of requests - but I realized, making llSetScriptState function on a script given to an object solves all of my requests. Is this behavior by design or a bug? |
Cailyn Miller
mmm.... shiny
![]() Join date: 11 Mar 2003
Posts: 369
|
Rezzing rotated objects
07-14-2003 00:24
Originally posted by Nada Epoch i will say i did run into a problem last week where an object had been put into another object already rotated, and when it came out, we couldn't get it to set the proper rotation. needs more testing though. I've had a similar problem, although in my case the object was rezzed at the right rotation, but wrong position. Damn annoying ![]() |
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
|
07-14-2003 07:04
Something to check for an object that can't move or rotate on rez: I rezed a locked object and while the locked object could change its size via script, it could not rotate itself or move itself.
|
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
|
More
08-06-2003 11:35
I'm adding to this thread for two reasons:
1) I have a few more things I'd like to see, now that I'm more familiar with LSL 2) I want to bump this thread, since we're getting closer to v1.1. ![]() My new list of 5: 1) script permissions/ownership (already in, but I'm not gonna change it) 2) Create/Alter notecards 3) set "constants" from a pie menu 4) determine if an avatar is in a specified group, even if that group isn't their "active" group. 5) state-scoped variables and functions, with evaluated initializers _____________________
Grim
"God only made a few perfect heads, the rest of them he put hair on." -- Unknown |
Christopher Nomad
Pontificator
Join date: 9 Aug 2003
Posts: 211
|
08-18-2003 08:14
Stupid Noob Comment here but... editing sctipts IN the inventory would be nice.
I find it a hassle to always dump things out on the ground to just "look" at the code. Or am I missing some way that this can be done? |
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
|
08-18-2003 09:34
Originally posted by Christopher Nomad Stupid Noob Comment here but... editing sctipts IN the inventory would be nice. I find it a hassle to always dump things out on the ground to just "look" at the code. You can edit a script in your inventory, so long as the script is actually in your inventory, and not in an object that's in your inventory. I think what you really want is to be able to access an object's contents without having to rez the object. (Join the club. ![]() _____________________
Grim
"God only made a few perfect heads, the rest of them he put hair on." -- Unknown |
Garoad Kuroda
Prophet of Muppetry
![]() Join date: 5 Sep 2003
Posts: 2,989
|
10-05-2003 18:33
Bump to "Rez" (pun intended?) a good thread...
As for suggestions I don't have anything specific at the moment, but I would rather see more *functionality* than something like switch statements (for example). If it can be done currently, but just happens to be a little longer to type or whatever, I'd much rather see more llEtc functions and stuff like that. Switch/case would be cool but if it's between being able to use that and being able to write to notecards...who would rather see switch/case?? Of course, this might not be the type of suggestion being looked for...but the type of improvement wasn't specifed. (Okay....how about a llFindObscureRuntimeBug.ThatWouldTakeForeverToFindWithoutThisFunction() ? |
Misnomer Jones
3 is the magic number
![]() Join date: 27 Jan 2003
Posts: 1,800
|
10-05-2003 18:40
How about a better way to learn it ??!!
_____________________
|
Piprrr Godel
Code Wrangler
![]() Join date: 25 Sep 2003
Posts: 54
|
Being a gallimaufry of suggestions
10-06-2003 14:00
Ho, ho, ho! It's hand grenades I throw!
![]()
(ICYC, I wrote my first script the other night. It was a ball, but very frustrating. However the radial object placement effector now makes it easy to evenly place objects in a circle, a la Stonehenge or gazebo support columns.) _____________________
I'm taking reality in small doses to build immunity.
|
Garoad Kuroda
Prophet of Muppetry
![]() Join date: 5 Sep 2003
Posts: 2,989
|
10-13-2003 22:54
Wow...
Well I'm sure they'd be happy to start on that if you donated $1,000,000 (real life) to hire some new employees. hehe I bet it's easier to add new functionality (new llEtc functions) than it is to add major new script language enhancements...I think that'd be a pain...(personal opinion). Of course that's what I'd rather see so maybe I'm biased ![]() |
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
10-14-2003 00:05
I think the *first* and probobly eiasiest of the camera functions that should be implimented is llDetectedCamera();
For objects it will return <0,0,0>. But for avitars, it will return the offset of the camera from the avitar's position (in mouselook, it should return <0,0,0> ![]() _____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
|
Jack Digeridoo
machinimaniac
![]() Join date: 29 Jul 2003
Posts: 1,170
|
10-14-2003 07:15
1. Hash
2. Regex 3. Manip the HUD, 2d UI funcs 4. Write to notecard or better yet, create table, select, insert, update, delete ![]() 5. Determin x/y coords of the face where the touch_start event was triggered. |
Gwydeon Nomad
Registered User
Join date: 1 May 2003
Posts: 480
|
10-14-2003 08:48
Make
Somone Else Do It ![]() |
Piprrr Godel
Code Wrangler
![]() Join date: 25 Sep 2003
Posts: 54
|
10-14-2003 12:00
Originally posted by Garoad Kuroda Wow... Well I'm sure they'd be happy to start on that if you donated $1,000,000 (real life) to hire some new employees. hehe I bet it's easier to add new functionality (new llEtc functions) than it is to add major new script language enhancements.. Actually, many of the items I mentioned should be fairly trivial to implement. For example, the llRezObject() return value should be dead easy since presumably the newly created object's ID info is right on hand. The switch() should be straightforward, unless you want to take advantage of O(1) optimizations, which is what occurs in present-day compilers and interpreters. (What, you thought that switch() was merely translated into else ifs? Nope. There's a reason why switch(), in C and C++, has cases based solely on numeric values and not also on more sophisticated comparisons. That's because the switch()'s case values are usually computed as jump offsets. That is, the switch data value is not so much used in O(n) cascading ifs and else ifs, but as an O(1) index into a function offset table. Even still, such an implementation shouldn't be too hard. I think.) If you'd like, I could give a terse analysis on the relative implementation complexity for each of my line items. ![]() _____________________
I'm taking reality in small doses to build immunity.
|
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
|
10-14-2003 12:29
Regarding llRezObject, you can get the key of the rezzed object with the object_rez() event handler. I don't know of any way to tell if the rez attempt failed, though; a mechanism for obtaining that information would be helpful.
|
Piprrr Godel
Code Wrangler
![]() Join date: 25 Sep 2003
Posts: 54
|
llRezObject() should return a value
10-14-2003 12:51
Originally posted by Jake Cellardoor Regarding llRezObject, you can get the key of the rezzed object with the object_rez() event handler. I don't know of any way to tell if the rez attempt failed, though; a mechanism for obtaining that information would be helpful. Ah, ok, that's good to know. Duly noted! Thanks! It'd be easy to tell if llRezObject() failed if it returned NULL_OBJECT. (Urm, or whatever the appropriate constant is. I'm at work and so cannot consult TFM.) A problem with the method you provide is that things that are closely associated are better implemented within as close to the same lexical scope as possible. That is, if you have two semantically identical implementations, but one has things broken into disparate parts in separate files, and the other has its entire implementation within the same part of one file, the latter implementation is easier to understand and maintain. It's easier for human beings to cognitively link things together the closer those things are to one another. This is one of the touted advantages of object-oriented encapsulation in that the data and the functions that operate on them are forced to be declared within the same lexical scope; pathological configurations whereby the data and its functions are separated are syntactically discouraged. Urgh. I'm showing I'm an academic again. Pardon me whilst I don my geek pointy hat and sulk in the corner again. ![]() _____________________
I'm taking reality in small doses to build immunity.
|
Garoad Kuroda
Prophet of Muppetry
![]() Join date: 5 Sep 2003
Posts: 2,989
|
10-14-2003 13:46
"Academic" is right I didn't even read that last big paragraph...it must have been out of a school.
"Academic" dirty word.. Above I was referring more to the number of suggestions (ahem, they asked for 5 ![]() ![]() |
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
|
Re: llRezObject() should return a value
10-14-2003 14:57
Originally posted by Piprrr Godel A problem with the method you provide is that things that are closely associated are better implemented within as close to the same lexical scope as possible. I completely agree. I advocate object-oriented encapsulation when possible; alas, LSL makes it difficult. LSL often uses event handlers when it would be more convenient to the scripter if a library call simply returned a value. I don't know why LSL was designed this way, but my guess (and this is just a guess) is that it's a performance issue. Some of the library calls involve requests that are potentially time-consuming, and LSL's designers figured it'd be better to let the script continue executing instead of making it wait. For example, llGetNotecardLine doesn't simply return a string, because it might take the system a long time to look up that string. So instead your script goes on about its business and you just wait for your dataserver() event handler to be called when the data is available. llRezObject seems to work pretty quickly -- it would have to, since it's how guns fire bullets -- but maybe getting the actual key of the rezzed object is time-consuming? (Again, this is pure speculation on my part.) |
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
Re: llRezObject() should return a value
10-14-2003 21:52
Originally posted by Piprrr Godel It'd be easy to tell if llRezObject() failed if it returned NULL_OBJECT. (Urm, or whatever the appropriate constant is. I'm at work and so cannot consult TFM.) A problem with the method you provide is that things that are closely associated are better implemented within as close to the same lexical scope as possible. That is, if you have two semantically identical implementations, but one has things broken into disparate parts in separate files, and the other has its entire implementation within the same part of one file, the latter implementation is easier to understand and maintain. It's easier for human beings to cognitively link things together the closer those things are to one another. This is one of the touted advantages of object-oriented encapsulation in that the data and the functions that operate on them are forced to be declared within the same lexical scope; pathological configurations whereby the data and its functions are separated are syntactically discouraged. ::nod:: Events are generally difficult to impliment into large-scale scripts which rely on data being passed directly. I believe that states were created for the purpose of getting around this limitation: default { state_entry() { llGetNotecardLine(); state getData;} } state getData { dataserver() { //Dump data to global string. state useData } } state useData { //Use data here } It involves alot of loop-around, bend-the-rules, make-a-mess-and-clean-it-up kind of thinking to actually create a working complex script based on the event principle. But luckily LL provided us with a way we can sort-of encapsulate things, states. _____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
10-14-2003 22:02
Originally posted by Jake Cellardoor Regarding llRezObject, you can get the key of the rezzed object with the object_rez() event handler. I don't know of any way to tell if the rez attempt failed, though; a mechanism for obtaining that information would be helpful. Why not use a sensor? CODE
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
Re: Being a gallimaufry of suggestions
10-14-2003 22:11
Originally posted by Piprrr Godel I want to select N objects and pass them to the script. E.g., I have an Effector object that takes N objects and will space them evenly in a circle round a point. There is no way that I can select objects and pass them in as arguments to a script. (Urm, at least as far as I can tell. Can anyone enlighten me otherwise?) I have to add all the objects to the Effector's inventory and then run the script. You'd need to have a script in each object you'd want to effect using the effector, the effector would then tell the script you put on that object to move the object to a position, rotate the object, etc. There really isnt much of a way you can externally effect objects that the task (script) isnt running in. _____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
|