Moving Jaws for Creatures!??
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-03-2008 06:44
Hello everyone,
I am so very new to scripting and I have made a few avatars without the aid of moving jaws. BUT I would like to move on now and be able to make the jaw swivel in conjuction with a sound. So for instance, the jaw moves and then the sound plays. I have seen other Avatars with this ability with HUD where you press a button and the action and sound plays together. That is what I want to achieve but I have no idea where to start. I tried to look through Rotation guides but so far they are not very well worded and I get confused lol. I also tried to look at others scripts to see how they made the jaw move with the touch of the HUD button but most are non mod so I cant veiw the scripts to see how they do it. Lol not suprising really.
Can anyone help me with this? Or perhaps point me in the right direction?.
~Wynter Bracken
Creator of Phoenix Rising Designs.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
01-03-2008 06:50
Make the jaw a separate object which is attached to the chin for example.
then you can simply rotate it around its root prim.
Alternatively you can create more than one jaw, each with the wanted rotation, link them all together and then use some scripts to switch visibility of those prims.
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-03-2008 06:52
Ah thanks Squirrel  . Sounds simple enough.
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-04-2008 07:18
there are even a few animatition you can trigger that will move the av jaw, and any attached prim parts.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
01-04-2008 07:36
There's a scripted gadget called FurryTalk, or something like that, which you can adapt to make a prim avatar head open and close the mouth while typing text chat. The head has to be modifyable, and I think you have to make open and closed versions of the mouth prims. Not sure if it moves the prims or just changes transparency of sets. Of course, all it does is flap the jaws open and closed.
Nothing in SL today that I am aware of will sync any avatar's mouth with the actual words being typed in text chat or spoken in voice chat. Could be interesting if an application like Mimic (for Poser or DAZ|Studio characters) could be adapted to work with SL avatars.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-04-2008 08:10
From: Void Singer there are even a few animatition you can trigger that will move the av jaw, and any attached prim parts. Do you happen to know which animations these are?? ~Wynter Creator of Phoenix Rising Designs
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-04-2008 08:13
From: Ceera Murakami There's a scripted gadget called FurryTalk, or something like that, which you can adapt to make a prim avatar head open and close the mouth while typing text chat. The head has to be modifyable, and I think you have to make open and closed versions of the mouth prims. Not sure if it moves the prims or just changes transparency of sets. Of course, all it does is flap the jaws open and closed.
Nothing in SL today that I am aware of will sync any avatar's mouth with the actual words being typed in text chat or spoken in voice chat. Could be interesting if an application like Mimic (for Poser or DAZ|Studio characters) could be adapted to work with SL avatars. Yeah thats interesting ^^. But I don't really want it for typing anims, just for the jaws to move when a button is clicked on a HUD. And also for a sound to come out. I think what your thinking of is a type of TalkJaw. But thanks for the idea!  .
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
01-04-2008 09:10
The V3 generation furry avatars from Jakkal's Werehouse have jaws that can open, close, or have the tongue loll out of the mouth, as well as ears that can be in various positions, and they use a HUD to send commands to the head to actually move groups of prims. That may be the method you'd want.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
01-04-2008 09:17
From: Ceera Murakami The V3 generation furry avatars from Jakkal's Werehouse have jaws that can open, close, or have the tongue loll out of the mouth, as well as ears that can be in various positions, and they use a HUD to send commands to the head to actually move groups of prims. That may be the method you'd want. I've also seen that kind of mouth control on the Wyrvern avatars from Daryth Kennedy on the Isle of Wyrms..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
01-04-2008 11:08
Just a thought...
- a simple rotation on a sculptie that's been pre "half-cut" in the model so it works like a standard door?
_____________________
http://slurl.com/secondlife/Together
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-06-2008 05:59
From: Ceera Murakami The V3 generation furry avatars from Jakkal's Werehouse have jaws that can open, close, or have the tongue loll out of the mouth, as well as ears that can be in various positions, and they use a HUD to send commands to the head to actually move groups of prims. That may be the method you'd want. Yes, thats exactly what I mean. But its just the scripting part that is the problem hehe. I'm just wondering if there is a clear example of how to make it.
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-06-2008 11:45
From: Wynter Bracken Do you happen to know which animations these are??
~Wynter
Creator of Phoenix Rising Designs express_open_mouth d63bc1f9-fc81-9625-a0c6-007176d82eb7 others can be found at https://wiki.secondlife.com/wiki/Internal_Animations
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-07-2008 03:55
Hmm I tried that as a Gesture, with the open mouth action and the Jaw attached to the chin. But it didn't work. I also tried to add the jaw to the mouth of the AV but that didn't work either. But thanks for the idea. Unless I'm doing something wrong? lol.
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
01-07-2008 17:28
This script will make the jaw move up and down when the mouth opens and closes, and is an example of how to trigger the SL default animations. Is the jaw an attachment point? If so anything attached to it should move up and down when this script makes the mouth open and close. //touching worn object will open close mouth
string ANIMATION = "express_open_mouth"; integer TouchSW;
default { state_entry() { llSay(0, "Open Mouth Animation"); if (!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)) { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } }
changed(integer change) { if(change & 128) // You'd better put the this changed() event when you use llGetOwner { // by way of precaution. llResetScript(); } }
touch_start(integer total_number) { if(TouchSW == FALSE) { //llOwnerSay("Tongue Out"); llSetTimerEvent(0.5); } else { //llOwnerSay("Tongue In");
llSetTimerEvent(0); } TouchSW = !TouchSW; } timer() { llStopAnimation(ANIMATION); llStartAnimation(ANIMATION); } }
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-07-2008 19:18
well after playing with several of the express animations I didn't get any results... apparently they all use morphs (guessing)... so my limited suggestion is to go with a seperate mouth or chin attachment and a cut root prim with something like a door script to rotate it (you can use an off channel that filters for the owner)... you can still gesturize it by making the gesture play a chat command to move instead of an animation... sorry for the misinformation, someone had told me that's how they'd managed it once but I can't seem to make it work with any of the ones I tried
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-08-2008 07:21
From: ArchTx Edo This script will make the jaw move up and down when the mouth opens and closes, and is an example of how to trigger the SL default animations.
Is the jaw an attachment point? If so anything attached to it should move up and down when this script makes the mouth open and close. The Jaw is attached to the chin, but could easily be attached to the mouth aswell. What script is this that could make it open and close?.
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-08-2008 07:29
From: Void Singer well after playing with several of the express animations I didn't get any results... apparently they all use morphs (guessing)... so my limited suggestion is to go with a seperate mouth or chin attachment and a cut root prim with something like a door script to rotate it (you can use an off channel that filters for the owner)... you can still gesturize it by making the gesture play a chat command to move instead of an animation... sorry for the misinformation, someone had told me that's how they'd managed it once but I can't seem to make it work with any of the ones I tried Thats fine, no worries. It seemed like a plausible explaination actually, that when the mouth opens the chin should make an attachment move aswell but apparently not as you have seen. I did have a go at a door script, placing it in the root prim lol, but considering Im new to scripts I wasn't sure how to make it open and close the jaw vertically and not horizontal and also it was touch based. I know how to set up the gesture and it would obviously have to have a chat command like you said, but how would I go about it?. Do I just pick any Channel? like for instance /666?. Sorry lol, im not very good at all this... 
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-08-2008 16:55
From: Wynter Bracken Thats fine, no worries. It seemed like a plausible explaination actually, that when the mouth opens the chin should make an attachment move aswell but apparently not as you have seen. I did have a go at a door script, placing it in the root prim lol, but considering Im new to scripts I wasn't sure how to make it open and close the jaw vertically and not horizontal and also it was touch based. I know how to set up the gesture and it would obviously have to have a chat command like you said, but how would I go about it?. Do I just pick any Channel? like for instance /666?. Sorry lol, im not very good at all this...  I'll promote my super simple door script again.... just rotate the door prim, link you jaw to it and poof done //-- works in ANY single prim door, linked or un-linked //-- works in multi prim doors NOT linked to a larger structure //-- REQUIREMENTS: a cut root prim, suggest cube, pathcut start=.125, end=.625 //-- CAVEAT: single prim doors are limited to 5m width
//--// USERS MODIFY HERE v integer gIntDoorSwing = 30; //-- use -# to reverse the direction of swing, eg. -90; integer gIntChannel = 42; //-- chat channel to use string gStrCommand = "talk"; //-- Capitalization counts //--// USERS MODIFY HERE ^
key gKeyOwner; rotation gRotDoorSwing;
default{ state_entry(){ gRotDoorSwing = llEuler2Rot( <.0, .0, (float)vgIntDoorSwing * DEG_TO_RAD> ); llListen( gIntChannel, "", (gKeyOwner = llGetOwner()), gStrCommand ); }
listen( integer vIntChannel, vStrName, vKeyOwner, vStrCommand){ integer vIntCount = 4; //-- use even numbers do{ gRotDoorSwing.s *= -1; llSetLocalRot( gRotDoorSwing * llGetLocalRot() ); //-- add a small sleep if it's too fast }while (--vIntCount); }
changed( integer vIntChanged ){ if (CHANGED_OWNER & vIntChanged){ gKeyOwner = llGetOwner(); } } }
the above example would use /42 talk to activate original door script here 
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-09-2008 10:52
Ah great, thankyou very much. That should come as useful  .
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
01-09-2008 13:14
From: Wynter Bracken The Jaw is attached to the chin, but could easily be attached to the mouth aswell. What script is this that could make it open and close?. Opps, I edited my earlier post to add the script I referenced.
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-11-2008 04:23
From: Void Singer I'll promote my super simple door script again.... just rotate the door prim, link you jaw to it and poof done //-- works in ANY single prim door, linked or un-linked //-- works in multi prim doors NOT linked to a larger structure //-- REQUIREMENTS: a cut root prim, suggest cube, pathcut start=.125, end=.625 //-- CAVEAT: single prim doors are limited to 5m width
//--// USERS MODIFY HERE v integer gIntDoorSwing = 30; //-- use -# to reverse the direction of swing, eg. -90; integer gIntChannel = 42; //-- chat channel to use string gStrCommand = "talk"; //-- Capitalization counts //--// USERS MODIFY HERE ^
key gKeyOwner; rotation gRotDoorSwing;
default{ state_entry(){ gRotDoorSwing = llEuler2Rot( <.0, .0, (float)vgIntDoorSwing * DEG_TO_RAD> ); llListen( gIntChannel, "", (gKeyOwner = llGetOwner()), gStrCommand ); }
listen( integer vIntChannel, vStrName, vKeyOwner, vStrCommand){ integer vIntCount = 4; //-- use even numbers do{ gRotDoorSwing.s *= -1; llSetLocalRot( gRotDoorSwing * llGetLocalRot() ); //-- add a small sleep if it's too fast }while (--vIntCount); }
changed( integer vIntChanged ){ if (CHANGED_OWNER & vIntChanged){ gKeyOwner = llGetOwner(); } } }
the above example would use /42 talk to activate original door script here  Hmm ok  great but the only thing is that it gives me a syntax error on (23,29). Which is the vStrName part. I dont know what it means  .
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-11-2008 19:36
//-- works in ANY single prim door, linked or un-linked //-- works in multi prim doors NOT linked to a larger structure //-- REQUIREMENTS: a cut root prim, suggest cube, pathcut start=.125, end=.625 //-- CAVEAT: single prim doors are limited to 5m width
//--// USERS MODIFY HERE v integer gIntDoorSwing = 30; //-- use -# to reverse the direction of swing, eg. -90; integer gIntChannel = 42; //-- chat channel to use string gStrCommand = "talk"; //-- Capitalization counts //--// USERS MODIFY HERE ^
key gKeyOwner; rotation gRotDoorSwing;
default{ state_entry(){ gRotDoorSwing = llEuler2Rot( <.0, .0, (float)vgIntDoorSwing * DEG_TO_RAD> ); llListen( gIntChannel, "", (gKeyOwner = llGetOwner()), gStrCommand ); }
listen( integer vIntChannel, string vStrName, key vKeyOwner, string vStrCommand){ integer vIntCount = 4; //-- use even numbers do{ gRotDoorSwing.s *= -1; llSetLocalRot( gRotDoorSwing * llGetLocalRot() ); //-- add a small sleep if it's too fast }while (--vIntCount); }
changed( integer vIntChanged ){ if (CHANGED_OWNER & vIntChanged){ gKeyOwner = llGetOwner(); } } }
missing the type declarations in the listen event, fixed. (always found that an annoyance in lsl to have to redeclare the types used in inbuilt functions)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-12-2008 09:00
From: Void Singer //-- works in ANY single prim door, linked or un-linked //-- works in multi prim doors NOT linked to a larger structure //-- REQUIREMENTS: a cut root prim, suggest cube, pathcut start=.125, end=.625 //-- CAVEAT: single prim doors are limited to 5m width
//--// USERS MODIFY HERE v integer gIntDoorSwing = 30; //-- use -# to reverse the direction of swing, eg. -90; integer gIntChannel = 42; //-- chat channel to use string gStrCommand = "talk"; //-- Capitalization counts //--// USERS MODIFY HERE ^
key gKeyOwner; rotation gRotDoorSwing;
default{ state_entry(){ gRotDoorSwing = llEuler2Rot( <.0, .0, (float)vgIntDoorSwing * DEG_TO_RAD> ); llListen( gIntChannel, "", (gKeyOwner = llGetOwner()), gStrCommand ); }
listen( integer vIntChannel, string vStrName, key vKeyOwner, string vStrCommand){ integer vIntCount = 4; //-- use even numbers do{ gRotDoorSwing.s *= -1; llSetLocalRot( gRotDoorSwing * llGetLocalRot() ); //-- add a small sleep if it's too fast }while (--vIntCount); }
changed( integer vIntChanged ){ if (CHANGED_OWNER & vIntChanged){ gKeyOwner = llGetOwner(); } } }
missing the type declarations in the listen event, fixed. (always found that an annoyance in lsl to have to redeclare the types used in inbuilt functions) Ok, but now there is another Error, this time in line 16,60... * DEG_TO_RAD>. And it says 'Error - Name not defined in scope'. lol  .....
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-12-2008 18:59
I swear I'm gonna stop doing rewrites when I can't get on SL.... the variable name vgIntDoorSwing, should just be gIntDoorSwing....
but hey you're learning about debugging code right? =P
name not defined, means you either misspelled a function or variable name, or forgot to declare it using type variable_name or defined it in the wrong place (like a different event or state)
on the subject of compile errors the cursor will be placed directly after the point that caused the error (in the script window) if it's a variable, it'll be right after the variable, if it's a function it'll be after the function call (or after the missing part) or the next line if it's missing a ; ... it gets more complicated if it's missing braces so if the immediate varibles etv looks good check braces
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Wynter Bracken
Designer, Artist & Wacko
Join date: 8 Nov 2007
Posts: 16
|
01-16-2008 05:18
From: Void Singer I swear I'm gonna stop doing rewrites when I can't get on SL.... the variable name vgIntDoorSwing, should just be gIntDoorSwing....
but hey you're learning about debugging code right? =P
name not defined, means you either misspelled a function or variable name, or forgot to declare it using type variable_name or defined it in the wrong place (like a different event or state)
on the subject of compile errors the cursor will be placed directly after the point that caused the error (in the script window) if it's a variable, it'll be right after the variable, if it's a function it'll be after the function call (or after the missing part) or the next line if it's missing a ; ... it gets more complicated if it's missing braces so if the immediate varibles etv looks good check braces Ah Ha! Yes thankyou that worked.  . Now I have a creature with moving jaws. I made a few gestures with sound and the jaw moves with it hehe, Thanks alot!  . I am certiantly learning thats for sure.  . By the way if I wanted the jaw to move more slowly on certain Gestures would I have to create a new script and then change that? And then put that into the jaw aswell?...
_____________________
:: Math Is Nothing More But The Lesbian Sister of Biology ::
|