Jump to content

Scripting Bodies


Miltades
 Share

You are about to reply to a thread that has been inactive for 2164 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

I have me a body I would like to script. However i have no idea how to. So far I have been using multiple copies of said body with the needed textures for alpha layers on them. As you can imagine this is super tedious when updating the body.

It consists of 6 faces, I would like to be able to click on the body itself (or a HUD it doesn't matter really.) And be able to choose a texture based on what it is. So. Tank Top Alpha, T Shirt Alpha. Long Pants Alpha, No alpha ... and for the textures to appear on the correct face for that alpha texture.

Does this make sense? Is there anyone who could help me?

 

Thank you

PS : This body isn't for commercial purposes. It's just my personal avatar and I have no interest in making a profit off of it.

Link to comment
Share on other sites

You're basically looking at scripting a texture changer, for which you will find probably hundreds of free examples.  You could write it in several different ways, but you have already suggested perhaps the easiest one.  Let each face on the model be the trigger site for a dialog menu, and let the various clothing textures for that face be the dialog choices.  Then the heart of your script is simply a touch_start event containing a stack of dialogs in the form

if (llDetectedTouchFace(0) == 0){    llDialog(llDetectedKey(0),"\nPick a texture ... any texture..",gHatTextures,gChannel);}

Listen for the choice and apply the appropriate texture to that face. 

If you are new to scripting dialogs, spend some time with http://wiki.secondlife.com/wiki/Dialog_Menus .

 

Link to comment
Share on other sites

  • 1 month later...
You are about to reply to a thread that has been inactive for 2164 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...