Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Cross script function calls and state changes

Renault Clio
Registered User
Join date: 26 Aug 2004
Posts: 130
03-09-2005 04:42
It'd be nice if LSL would allow code to be split into multiple scripts, and function calls and state changes being performed. This would allow to assign different rights to different parts of a script, allowing for code libraries, configuration files while protecting the core script, and whatsit.
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
03-09-2005 05:34
It would be interesting if we had includes... especially if we could reference included scripts by key, and not have them in the object inventory. Then we could build like, standard libraries and whatnot. :)

I have -no- idea if that would be feasible though. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
03-09-2005 07:43
From: Renault Clio
It'd be nice if LSL would allow code to be split into multiple scripts, and function calls and state changes being performed. This would allow to assign different rights to different parts of a script, allowing for code libraries, configuration files while protecting the core script, and whatsit.

I use llMessageLinked/link_message for script transitions and event passing already. Since sending a link_message to LINK_SET includes the same prim, I typically store several scripts in an object and pass everything off in this manner. I believe Xylor used to do the same... and he's way more module-oriented than I ever will be.

As for static includes, would be nice, but then you run into the problems of using a single script buffer... people stealing others' scripts as includes... and yeah, things start to look fine as they are. :D
_____________________
---
Renault Clio
Registered User
Join date: 26 Aug 2004
Posts: 130
03-09-2005 11:28
From: Jeffrey Gomez
people stealing others' scripts as includes... and yeah, things start to look fine as they are. :D

Not if no-copy is set. The idea was code packages with no-mod, to hide the code and protect it from rip offs, and no-copy where needed.

Anyway, I wanted multiple scripts to put standard code into different ones, specify my internal interfaces and discovery, and then being able to plug them together into something working. E.g. for my jukebox, where there is a core player script, and then pluggable speaker and playlist scripts, which would work by putting them into the object and that's it.

I guess I'll give llMessageLinked a try, but direct function calls would be more elegant.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
03-09-2005 13:28
From: Renault Clio
Not if no-copy is set. The idea was code packages with no-mod, to hide the code and protect it from rip offs, and no-copy where needed.

Oh I know. My point was that's a little hard to regulate.
_____________________
---