Treacly Brodsky
Pixel SLinger
Join date: 23 Jul 2004
Posts: 186
|
01-03-2006 02:59
I'm looking for a way to make a prim (when invoked with llTouch) insert a script into another prim (not attached). Here's the catch; The second prim does not have a script in it to begin with and the first prim only knows (which) prim to place a script in by means of user input (normal left click selection).
ie. - user touches prim - prim/script prompts user to select another prim - user selects second prim (no script, no physics) - upon selection, 1st prim inserts (arbitrary) script into 2nd prim
Hope this makes sense? Is this at all possible?
Thanks, Treacly
|
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
|
01-03-2006 03:37
The only way of inserting a running script into another prim is by use of llRemoteLoadScriptPin, which needs the key of the target prim as input, and to have set the pin inside the target prim using a script at some time in the past (although there need not be a script in there any more).
I think llGiveInventory could be used to get a non-running script into another prim without the requirement of having run a script in the prim in the past, but in either case you still need to get the key of the target prim. I don't know of a way to do that by the avatar pointing or touching. Perhaps with a call to llSensor you could get keys of nearby prims, and perhaps if you had control of the name of the target prim the llSensor could be filtered to see only that prim.
_____________________
-Seifert Surface 2G!tGLf 2nLt9cG
|