Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is this possible?

Homer Antler
Registered User
Join date: 21 Oct 2006
Posts: 105
12-11-2006 09:43
Hi:

I want to return an object to a user as a key when they make successful payment at my vending machine. This key will need to be unique for each payment. So I just want to know if I can do the following. Any help would be appreciated.

My object will be made of 4 prims and it will have different textures for each prim.

1) Can I change the textures of each prim before I give the object to the user? If so how would I go about doing that?

2) Would I be able to change the object description or name through a script before I give that object to the user. I want to identify a unique number as the object name. Is that possible?

Please let me know if I am not clear. Just thought it would be easy to ask the gurus.

Thank you so much.

-Homer
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
12-11-2006 10:32
Sadly, no, you cannot change anything about an object via script while it is in either your inventory, or an object's (in this case, the vendor's) inventory. You can Rez it or Delete it from the latter, but nothing else.

What you can do is use some sort of client/server architecture to record sales of objects, giving the user a generic "key" object, and when it is rezzed, it requests the first unregistered instance from the server for that owner, and the server registers that instance as "used" so it cannot be requested again. The server can return any additional information which tells the object about the instance it is registering, such as texture asset IDs and so forth. The object itself can then change its appearance, name, description, shape, whatever.

You can use llEmail for in-world client/server communications of this sort, or use an external web server via llHTTPRequest.