Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGiveInventory() for prims

Kevin Korvin
Registered User
Join date: 3 May 2005
Posts: 13
12-18-2005 14:55
I want to drop a script into a prim with the llGiveInventory() call, but I notice it is not running as if it were dropped in by hand, even though the documents says:

"Give the named inventory item to the keyed avatar or object in the same simulator as the giver. If the recipient is an avatar, the avatar then follows the normal procedure of accepting or denying the offer. If the recipient is an object, the same permissions apply as if you were dragging inventory onto the object by hand, ie if llAllowInventoryDrop has been called with TRUE, any other object can pass objects to its inventory."

So if you drag onto a root prim, the script runs and is in the running state, but if you llGiveInventory to the prim, it is not running. There seems to be no provision for llSetScriptState(string name, integer run) for a prim.

Any solutions?
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
12-18-2005 15:00
When llGiveInventory gives a script to an object, it always sets it to non-running. If you want to pass a running script to an object, you need to use these:
llSetRemoteAccessScriptPin
llRemoteLoadScriptPin
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
12-18-2005 15:14
From: Kevin Korvin
I want to drop a script into a prim with the llGiveInventory() call, but I notice it is not running as if it were dropped in by hand, even though the documents says:

"Give the named inventory item to the keyed avatar or object in the same simulator as the giver. If the recipient is an avatar, the avatar then follows the normal procedure of accepting or denying the offer. If the recipient is an object, the same permissions apply as if you were dragging inventory onto the object by hand, ie if llAllowInventoryDrop has been called with TRUE, any other object can pass objects to its inventory."

So if you drag onto a root prim, the script runs and is in the running state, but if you llGiveInventory to the prim, it is not running. There seems to be no provision for llSetScriptState(string name, integer run) for a prim.

Any solutions?


Examine llRemoteLoadScriptPin at http://secondlife.com/badgeo/wakka.php?wakka=llRemoteLoadScriptPin.
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?”
Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
Kevin Korvin
Registered User
Join date: 3 May 2005
Posts: 13
12-18-2005 15:23
Well, this is seems to be the solution, but i am getting "trying to illegally load script ".

It is some minor problem, I suppose.
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
12-18-2005 15:41
Have you added a script to set the PIN in the recieving prim? (technically, the PIN is an attribute of the prim, just like the texture or color or having particles, so you can set the PIN and delete that script...)
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?”
Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
Kevin Korvin
Registered User
Join date: 3 May 2005
Posts: 13
12-18-2005 20:12
Thanks, I have that working now.

So, is there a default pin for each object?
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
12-18-2005 20:22
No default PIN; the default is zero or "off".
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?”
Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
Kevin Korvin
Registered User
Join date: 3 May 2005
Posts: 13
12-18-2005 20:29
From: Aliasi Stonebender
No default PIN; the default is zero or "off".


Well, thats makes for a fun time. Setting 100's of prim's magic numbers...

Thanks for the help.