Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script-Creating Scripts..? Hm..

CrazeeTastee Gupte
Registered User
Join date: 13 Nov 2005
Posts: 13
03-10-2006 16:17
Hey there! It'd take a long time to explain this project I'm playing around with for fun, so I'll just say what my problem is.

I need to be able to write a script that can create other scripts on that object with passed information. To take a string and put it into an script and save it onto itself. I have no idea how I would go about this, or if it is even possible...

Any tips? Or can somebody confirm that this is impossible?

Thanks.
Adman Drake
Registered User
Join date: 9 Feb 2006
Posts: 96
03-10-2006 16:29
From: CrazeeTastee Gupte

Any tips? Or can somebody confirm that this is impossible?


Good idea... but I don't see any way to programatically turn a string into a new script file. Without that step, I'm not sure there's any way to proceed...

Adman
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
03-10-2006 18:28
Pretty sure that much like notecards, scripts cannot be "auto generated" in any fashion. I'd guess your best bet would be to approach it from a different angle - Perhaps use llRemoteLoadScriptPin to transfer a script into the target object (Or if you can just have a latent "receiver script" that is already in the target object, I'd try that first if possible), and then have your receiver script listen for your parameters/info to tell it what function it should perform?
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
03-10-2006 18:40
I had projects/thoughts that required similar things (being able to dynamically create arbitrary programs and update them worldwide). The above people are correct - there is no way to use LSL to automatically create an LSL file without human interaction. My solution was/is to create a interpretive language that runs on top of LSL, and thus programs could be save (to my backend server) and distributed worldwide. Of course LSL is slow and an interpretive language running on top of LSL is even slower, but if it is not a time sensitive thing you want to accomplish, this is one way you could.