Jump to content

emotion texture changing scripts


zigazav
 Share

Recommended Posts

OK, I've had quite a few avatars that can change their facial expression by having a HUD change it's texture by clicking the emotion texture you want to use on it. The facial expression prim is invisible except for the mouth texture on it. What I want to know is, how do those shop people do it? I assume it works like this: The texture you want to apply onto the mouth has a button on a HUD that has it's own texture on it to be copied and applied to the mouth prim attached to the worn head prim. Each button on the HUD has it's own script targeted to apply it's own texture to the mouth prim when clicked. Even though I understand the process, I don't understand the scripting part. I'd like somebody to help me with that. Also, for blush effects, how would you script a button on the same HUD for it to target the blush prim without affecting the mouth prim. I know that Sky Miles and many other avatar builders are capable of doing this. I just wanna know how to do that thing to apply textures on an attached prim on a worn object that is not the root prim, by HUD. Any good help would be very appriciated. I don't understand LSL very well, as I am not a programmer.

Link to comment
Share on other sites

Facial expressions are controlled by a set of internal animations that Linden Lab has hard coded into the viewer.  Dora Gustafson posted a nice, compact script in the LSL Scripting Library that will let you activate selected expressions from that set from a dialog menu. Take a look >>> http://community.secondlife.com/t5/LSL-Library/Menu-by-JSON-structure/td-p/2127697

Link to comment
Share on other sites


... Also, for blush effects, how would you script a button on the same HUD for it to target the blush prim without affecting the mouth prim. I know that Sky Miles and many other avatar builders are capable of doing this. I just wanna know how to do that thing to apply textures on an attached prim on a worn object that is not the root prim, by HUD. Any good help would be very appriciated. I don't understand LSL very well, as I am not a programmer.

I've never heard of a blush prim myself but (unlike emotion animations) I can imagine that a blush prim might actually be an attachment. So these days HUDs talk to scripts in other attachments using llRegionSayTo() targeting the owner (the wearer of the HUD and other attachments). The receiving script in the attachment just has to be selective about which messages it chooses to process for whatever effect it's supposed to produce. The receiver scripts need to keep a listener open on the same channel the HUD will send that message, and one specific obscure channel out of four billion-odd possibilities is a good first step in being selective.

It's not possible for a script in one attachment to remotely change properties of another unscripted attachment, which is what I think was being suggested. (Theoretically one might push the script from one attachment to another using llRemoteLoadScriptPin(), but I really doubt that's a common practice. I don't know how one would find the identity of unscripted attachments to target, and anyway, loading a script more than once would likely be more expensive than leaving one running with an obscure open listener.)

Link to comment
Share on other sites


zigazav wrote:

OK, ... [sNIP to get to the point] I don't understand LSL very well, as I am not a programmer.

Most, if not all, LSL programmers start in the same place- we saw "magic" can be done here and we had a "great" vision that we'd like to realize.

 

Now, the real question is:

 

 

 

 

 

 

Is your vision important enough to actually learn to be a "programmer"?

 

It's not that difficult. The first step is simply realizing that you might benefit from starting from scratch, learning the "simple spells" first and then working your way up to the "high magic" you seek.

 

That's how all the rest of started and that is really the only path available. Unless, of course, you simply need a "spell". In that case, please use the Inworld Employment forum to seek a script magician. Or Wanted might be better if you lack Lindens to realize your dream. There are a few magi that seek apprentices.

 

At least you've taken the first step- admitting your ignorance. As long as you stay on that foot, you'll do well. The best magicians are those that realize how little they know.

Link to comment
Share on other sites

OK, Sky Miles, so you are looking at prim or mesh heads. The blush is just an overlay prim or face.

The script only has to look at what button was pushed, and send out chat that identifies the button. A script in the head listens for that chat, then uses either llSetLinkTexture or llSetLinkPrimitiveParamsFast.

I'm glossing over a bunch of details, those depend on where you are starting and where you want to go. Are you trying to add features to an existing head, or building one from scratch?

 
 
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...