Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

facial animation

Grafikimon Oh
Grafik Design
Join date: 1 Feb 2007
Posts: 35
02-11-2007 19:42
i see huds for facial shapes all the time so i wanted to put my own together for the sake of practice but I can't find any discussion on the forum about it. Are the face shapes gestures or somethign else.
Talon Brown
Slacker Punk
Join date: 17 May 2006
Posts: 352
02-11-2007 21:28
By face "shapes" I assume you mean animations like smiling and the like? If so, they're usually built-in anims. Here's a list of them from a Wiki.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-12-2007 02:17
There is a script written by Seagel Neville floating around that demonstrates the functionality.
I believe it is either in this forum or was one of the old Wikki Library or Example pages.
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
02-12-2007 11:16
...and here's a very cheap and cheerful example I include as a freebie script in a demo item.

CODE
// Produced by Pale Spectre to demonstrate the application of his Universal Control Device
// What you do with this script is up to you but it's difficult to use without a menu interface :)

integer channel = 123;
string curEmote;

list mnuWords = ["afraid+", "afraid", "anger+", "anger", "bored+", "bored", "cry+", "cry", "disdain", "embarras+", "embarrass", "frown", "kiss", "laugh+", "laugh", "open_mouth", "repulsed+", "repulsed", "sad+", "sad", "shrug+", "shrug", "smile", "surprise+", "surprise", "tongue_out", "toothsmile", "wink+", "wink", "worry+", "worry"];

list mnuEmotes = ["express_afraid", "express_afraid_emote", "express_anger", "express_anger_emote", "express_bored", "express_bored_emote", "express_cry", "express_cry_emote", "express_disdain", "express_embarrased", "express_embarrassed_emote", "express_frown", "express_kiss", "express_laugh", "express_laugh_emote", "express_open_mouth", "express_repulsed", "express_repulsed_emote", "express_sad", "express_sad_emote", "express_shrug", "express_shrug_emote", "express_smile", "express_surprise", "express_surprise_emote", "express_tongue_out", "express_toothsmile", "express_wink", "express_wink_emote", "express_worry", "express_worry_emote"];

default {
state_entry()
{
llListen(channel, "", llGetOwner(), "");
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}

on_rez(integer total_number)
{
llResetScript();
}

listen(integer channel, string name, key id, string message)
{
if (llListFindList(mnuWords, [message]) != -1)
{
curEmote = llList2String(mnuEmotes, llListFindList(mnuWords, [message]));
llStartAnimation(curEmote);
}
}
/123 toothsmile :D