Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

animate event

Konigmann Lippmann
Registered User
Join date: 15 Jun 2004
Posts: 40
05-31-2005 08:54
I've heard that the timers events set on animation overrides is a huge drain on resources. So I was trying to think of an alternative we could have that would not be such a drain.

With this in mind, I'd like to suggest the possibility of an animate() event. This event would be triggered automatically in a script anytime the playing animation on an AV changed. I'm not sure if this should be tied to some sort of permission (DETECT_ANIMATION_CHANGE)? But it seems to me that if it were, it should be implicitly granted to scripts in attachments similarly to the way PERMISSION_TRIGGER_ANIMATION is automaticly granted.

I imagine it might work something like this:

CODE
default
{
animate( string sAnimation )
{
if( sAnimation == "stand" )
sAnimation = "MyCustomStand";
else if( sAnimation == "walk" )
sAnimation = "MyCustomWalk";
else if( sAnimation == "fly" )
sAnimation = "MyCustomFly";
llStartAnimation( sAnimation );
}
}


I'm not sure why I thought of this, I'm not a great consumer of override products... Maybe it's just that the grid is down this morning.
Chilly Charlton
Registered User
Join date: 15 Jun 2004
Posts: 483
Object to Object communication
05-31-2005 09:24
This problem could also be solved with this: http://secondlife.com/vote/ proposition 6 ... Object to Object communications which is already high on the voted for feature list. I doubt object to object communications would put the same amount of stress on the servers as timers do. If a timer was still needed for some reason then a single master prim with a SINGLE timer could notify the rest. I think however even the one timer could be eliminated. Also with this feature not only syncronized animations could be implemented but LOTS of other things. It's a more general feature with more potential. Go vote yes on it!
Konigmann Lippmann
Registered User
Join date: 15 Jun 2004
Posts: 40
Notification vs Communication
05-31-2005 10:12
While I'll agree that Object2Object communications is important, I fail to see how it would solve this problem... Essentially the issue is that the timer has to fire just to detect a change in the animation, if it doesn't change, it doesn't do anything.
In general these timers are firing very quickly so that they can detect a change in the AV. most of the time they'll do very little else, but apparently if you get a large number of AVs together, the sheer numbers of these timers combined with the very quick rate at which they like to fire creates a drain.

Now if everybody were to stand up and walk across the room at the same time, only 1 AV would need to detect the change of animation, and communicate with all the other AVs to tell them what kind of animation to play... but people do things as individuals, so they all need separate timers to detect the change.