update a script inside of an object
|
|
Maris Kanto
Registered User
Join date: 4 Dec 2007
Posts: 47
|
12-18-2007 01:51
Hello again..
Here is the situation: 1) I have many product items which all include the same script in them; 2) Product items are bought by the customers; 3) I do frequent updates to the product item script; 4) ppl do get notified about new updates via existing update server solutions.
So what I would like to do next would be: 5) ppl come to my shop; 6) they wear my product item they have purchased earlier; 7) they click on Update sign and it replaces old script with the new one inside of the item.
So far I've been trying to use llRemoteLoadScriptPin, but here is no luck!
Any ideas how my scenario could be done?
What I dont want to do is to hand a new version of the product as a new object! So this option is not what I would like to discuss here.
Thanks, Maris
|
|
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
|
12-18-2007 04:07
what is the problem with llRemoteLoadScriptPin? can you post a example? from the wiki: If the owner of the object containing this script can modify the object identified by the key target, and if the pin matches the PIN previously set using llSetRemoteScriptAccessPin (on the target prim), then the script name will be copied into target.
_____________________
L$ is the root of all evil videos work! thanks SL 
|
|
Maris Kanto
Registered User
Join date: 4 Dec 2007
Posts: 47
|
12-18-2007 06:31
1) Owner of the product differs from the owner of the update sign; 2) Owner of the product has modify/copy/notransfer for the item itself and no modify/nocopy/transfer for the script
The other thing - if customer comes and clicks the update sign (supposing that he/she wears the product item on), i was not able to figure out - how can i find product item's key which needs to be updated, i only know customer's key - llDetectedKey(0) and i also know that he/she is wearing the product item as an attachment.
|
|
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
|
12-18-2007 06:55
heyas;
if they are wearing the object, you can tell what attachment point it is (or should be) on. i think there's a function to get an object on an avatar's specific points. i know there are discount cards that vendors can find when an avatar wears it on their right hand.
if i understand remote script pins correctly, the original script has to set the pin. if you have old scripts you want to update and never put a set pin in.... i do believe you're out of luck.
|
|
Maris Kanto
Registered User
Join date: 4 Dec 2007
Posts: 47
|
12-18-2007 07:40
so is there any working example what does what i described initially!? as always - if the code is good - i am ready to buy it 
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
12-18-2007 07:45
From: Maris Kanto 1) Owner of the product differs from the owner of the update sign; Have the sign give the user an object when they then rez which will perform the update. That's how the one update system I'm familiar with works. From: someone 2) Owner of the product has modify/copy/notransfer for the item itself and no modify/nocopy/transfer for the script That shouldn't matter. The script isn't being modified, just deleted and replaced with another. From: someone how can i find product item's key which needs to be updated, i only know customer's key You will need some sort of pre-arranged method of communication for the item to announce it's UUID to the updater. From: Bloodsong Termagant if they are wearing the object, you can tell what attachment point it is (or should be) on. i think there's a function to get an object on an avatar's specific points. A scripted attachment can determine what point it's on via llGetAttached, but an external script cannot determine where an attachment is, only that an avatar has attachments, via llGetAgentInfo.
|
|
Maris Kanto
Registered User
Join date: 4 Dec 2007
Posts: 47
|
12-18-2007 08:14
Have the sign give the user an object when they then rez which will perform the update. That's how the one update system I'm familiar with works.
- if this is so - then i see no difference between giving the new product item itself instead of updating object.
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
12-18-2007 08:31
Depends on how much user-customization of the item is involved, and the perceived value of updating the existing object vs. having to setup a new one, I suppose.
|
|
Gregor Mougin
Registered User
Join date: 22 Jan 2007
Posts: 8
|
12-18-2007 10:12
From: Maris Kanto - if this is so - then i see no difference between giving the new product item itself instead of updating object. You can only load scripts into objects you have mod permission to. So if you own the object trying to make the update I doubt you have mod permission on your customers object.
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
12-18-2007 12:26
I posted a barebones system some time ago, you may find it useful. /15/8e/172797/1.html
|