Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animating a woodpecker pecking

Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
01-11-2010 02:00
I'm animating a woodpecker pecking at around 5Hz in 1 second bursts. I'm using two heads with half-transparent textures that're animated by llSetTextureAnim when triggered by a link message. Things are slightly complicated by the fact that each head actually consists of two parts - head and beak prims.

In spite of the proliferation of scripts, and the hit-or-miss nature of the synchronisation, it seems to work pretty well most of the time, though it does have its off days.

Is there a better way of doing this?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2010 02:17
three scripts, one to send messages to the other two, and the other two to exchange transparency is about the best you can do...

ETA:
CODE

integer x;
default{
state_entry(){
llSetTimerEvent( 0.2 );
}

timer(){
if (++x < 5){
llMessageLinked( LINK_THIS, 1, "", "" );
}else{
x %= 10;
}
}
}


CODE

default{
link_message( integer vIntNull, integer vIntTst, string vStrNull, key vKeyNull ){
if (vIntTst){ //-- use (!vIntTst) in the opposite script
llSetLinkAlpha( link_target_number_goes_here, (float)vIntTst, ALL_SIDES );
}
}
}
_____________________
|
| . "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...
| -
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-11-2010 02:42
Animating anything in second life is terrible.
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
01-11-2010 03:46
From: Void Singer
llSetLinkAlpha
Doh! I'd forgotten that one; it can all be done from a single script with precise synchronisation quite easily.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2010 05:55
From: Pete Olihenge
Doh! I'd forgotten that one; it can all be done from a single script with precise synchronisation quite easily.

depending on how many links you have to set at once... possible... but you also mentions something about texture animation in between? that's gotta be set from the specific prim (although it it doesn't need to change, you should be good)
_____________________
|
| . "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...
| -
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
01-11-2010 09:53
Having completely forgotten about llSetAlpha and llSetLinkAlpha I was faffing about with animated half-transparent textures and link messages to avoid having to use llSetLinkPrimitiveParams. I guess my subconscious knew I was missing the obvious and prompted me to post my question here.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-11-2010 15:19
heh, happens to me too.
_____________________
|
| . "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...
| -
Hooten Haller
Wonder and Joy
Join date: 5 Feb 2007
Posts: 45
01-12-2010 04:06
Faffing, eh? Can one say that in a PG forum? ;-)

With a sculpty head you will have fewer prims to animate.

Thinking outside the box, you can go even lower and less laggy with animated textures on a cube. Take a couple shots of the "real" woodpecker you made from the side view. A two frame flip book would be trivial to create.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-12-2010 04:25
From: Hooten Haller
Faffing, eh? Can one say that in a PG forum? ;-)

as long as we don't tell the kids it means wasting time (or were you thinking of fapping? ;) )
_____________________
|
| . "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...
| -
Hooten Haller
Wonder and Joy
Join date: 5 Feb 2007
Posts: 45
01-12-2010 04:39
I need a sarcasm emoticon so people will know I understood the meaning perfectly.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-12-2010 10:34
subtlety is lost in text, I just fixed it for ya ;)
_____________________
|
| . "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...
| -
Hooten Haller
Wonder and Joy
Join date: 5 Feb 2007
Posts: 45
01-15-2010 03:08
Ah, a moment too late bit I'll share it anyway:

http://02d9656.netsoljsp.com/SarcMark/modules/user/commonfiles/loadhome.do