Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Writing Commerce Scripts in Second Life

Millions of dollars change hands in Second Life. Find out how to create scripts to sell items in your own Second Life store.


advertisement
ommerce occurs in Second Life whenever money changes hands. Money, in Second Life, is the Linden Dollar. Although the Linden Dollar is not an actual currency, it can be freely exchanged for real-world currencies. Like many real-world currencies, the value of the Linden Dollar rises and falls against the US dollar. As of this writing, 1 US dollar buys approximately 186 Linden Dollars. Second Life avatars exchange Linden Dollars in three different ways; by:

  • Directly transferring money to another avatar
  • Offering an item for sale
  • Using a script to process a "Pay" command
Transferring money directly to another avatar is the simplest of these three processes. To do that, you simply right-click on the other avatar and choose "Pay" from the popup menu. You can now transfer any amount of Linden Dollars you have available to that avatar. From a commerce standpoint, direct transfer between avatars works fine for in-person service purchases, such as hiring another user to build something; however, for a store owner selling goods, direct money transfer is inefficient. Offering objects for sale is a major component of Second Life commerce—and direct transfer presents two obstacles. First, item purchases involve two direct transfers—the customer first transfers money to the owner, and the owner must then transfer the item to the avatar. More importantly, using direct transfer for item purchases requires the owner's presence for each sale.

Fortunately, you can get around both problems by simply marking items "for sale" in Second Life. Any avatar that encounters an object for sale can purchase that object for the specified price. Many stores in Second Life operate exactly that way; they're stocked with items marked for sale, and avatars purchase the items by selecting them and electing to buy. That functionality is built into Second Life objects, so such transactions need no custom scripting.

 
Figure 1. A Second Life Store: Here's my avatar, Encog Dod, in a typical Second Life store.
For example, to create a store in Second Life, you simply construct a small region and place the objects for sale there, selecting each object and marking it for sale. You can sell either the marked objects themselves, or copies of the marked objects. If you select the "Sell Copy" option, the original item remains available even after an avatar has purchased a copy. As you can imagine, selling copies is popular in Second Life. Figure 1 shows my avatar, Encog Dod, at a typical Second Life store.


Unfortunately, even though you can sell copies, if you have a large number of items for sale it takes a proportionally large volume of space to display and sell them. Additionally, because building a stand-alone store isn't always effective, many people sell items in malls in Second Life; just as in real life, that's where the customers are. That presents a different problem. Mall stores typically make only a limited number of prims (shape primitives) available. To save on prim usage and take up less space, vendors often use scripts to manage the selling process.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap