Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Remotely loading a script

jamieparsons Lemon
undergrad n00b
Join date: 5 Nov 2008
Posts: 36
11-20-2008 14:20
I'm having a problem trying to get a script from an object start another script from an object.

I've been searching through the functions and have come across the two I think that I'll need:

llSetRemoteScriptAccessPin

and

llRemoteLoadScriptPin

So I set the pin for the object I want activated but when it comes to starting it I hit a wall:

llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param)

as you can see this specifies that it needs a 'key target' which I don't know how to get for an object. string name = name of the script i want to load? How about actually getting the script just to run, what paramaters will I have to enter?

Is there an easier way for an objects script to load another objects script?

Hope someone can help! :)
shenanigan Oh
Registered User
Join date: 28 Apr 2007
Posts: 13
11-20-2008 14:51
When the RemoteLoadScriptPin Comes in have it look something like this.. I haven't tested it sorry.

integer Pin = 4567;
integer start_param;
integer Running = TRUE;

RemoteLoadScriptPin( id, "New Script 1", //Name of script you want to run in object
Pin,
Running,
start_param);
jamieparsons Lemon
undergrad n00b
Join date: 5 Nov 2008
Posts: 36
11-21-2008 00:13
thanks shen ill go test it
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
11-21-2008 07:58
I think this is more what you are looking for

// Stops 'ScriptName' (in the prim's inventory)
llSetScriptState("ScriptName", FALSE);

// Start 'ScriptName' (in the prim's inventory)
llSetScriptState("ScriptName", TRUE);

Also

llResetOtherScript(string name)

llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param)
is to add a script to a prim that has been prepared to have a script loaded to it by setting a pin.
_____________________
Ravanne's Dance Poles and Animations

Available at my Superstore and Showroom on Insula de Somni
http://slurl.com/secondlife/Insula de Somni/94/194/27/