Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script of wear on clothes

truthzz Puddlegum
Registered User
Join date: 29 Mar 2009
Posts: 4
03-29-2009 13:50
Does anyone know coding for resident to wear on clothes?
for example, resident is allow to click on a button then a free T shirt will be provided and wear on resident body or keep in resident inventory?

thanks
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-29-2009 14:15
Unless I misunderstand your question, that's the way most vendors in SL work for freebie items or ones that you pay for. Click a button, pay if necessary, and the item goes into inventory or, if you choose, you wear it. Or were you asking something completely different?
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
03-29-2009 15:36
There is no way to script a clothing-type to be worn automatically, only prim items. If you sell things in a box, though, when they 'Open' that box they have the option to either wear immediately or just copy (Or move if no-copy) it to inventory without wearing it immediately.

If it's a prim item, see llAttachToAvatar
http://lslwiki.net/lslwiki/wakka.php?wakka=llAttachToAvatar
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
03-29-2009 21:21
I saw some where a bot with the capacity of wear clothes and prim clotes usually used for model clothes on shops
_____________________


RAW terrain files - terraform your SIM!!
http://www.wishland.info/
PD:the wiki its your friend ;)
http://wiki.secondlife.com/wiki/LSL_Portal
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
03-29-2009 22:39
From: Papalopulus Kobolowski
I saw some where a bot with the capacity of wear clothes and prim clotes usually used for model clothes on shops


Since it's a bot, they are using a different viewer then the SL viewer, and have a third party program putting the clothing on automatically. Restricted Life Viewer will put clothing and remove clothing from an avatar without their permission. That is just an example of a different viewer, there are lots of them out there.
truthzz Puddlegum
Registered User
Join date: 29 Mar 2009
Posts: 4
04-01-2009 09:30
ohyeah, right! Rolig Loon
you are almost catch what i mean,
but its free for student,
do you know any coding for this?
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-01-2009 15:07
No coding required.

1.Make a box (a cube, a cylinder..... any shape will do).
2.With the Edit window open, choose the Contents page.
3.Look in your inventory to find the free T-shirt that you want to give.
4. Be sure that you set the T-shirt's permissions as you want them to be (probably copy/mod/trans), and then drag it from inventory onto the Contents page.
5. Choose the General page in your Edit window.
6. Click the For Sale box and set the Price = L$0.
7. Click the button that says "Copy."
8. Choose the menu selection that says to "Buy" on click.

You may put any texture and color on the box you wish. Most people would put a picture of the T-shirt on it.

That is the simplest kind of vendor possible in SL. You may put as many T-shirts as you like in the box. When someone clicks on the box, a copy of it goes into their inventory. They have to rez the box and open it to transfer all items into a new folder in inventory.

If you click the button that says "Contents" in step #7, above, the T-shirts will be transferred directly to the buyer's inventory when she clicks on the box. She will not get a copy of the box itself.

You can make much more complicated vendors, most of which DO require a script, but this type is easy and fast to make.
truthzz Puddlegum
Registered User
Join date: 29 Mar 2009
Posts: 4
04-02-2009 05:20
wao, thanks Rolig Loon
its helpful for my project, thanks million!
truthzz Puddlegum
Registered User
Join date: 29 Mar 2009
Posts: 4
04-02-2009 05:22
wanna ask a question again, does anyone know how to make a spot light in second life?
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-02-2009 07:45
Again, this is not a scripting question (although you could add a tiny script to make the light rotate), so it really belongs in the Building Tips forum. Briefly, though, the way it's typically done is to use a small spherical prim set to full bright as the light bulb and than link it to a cone that simulates a beam of light. You texture the cone with a graded white texture and make it fade from about 25% alpha to 100% alpha. Wander around SL and take a look at how lights work. It's pretty easy to figure out from what I just said.