Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Coordinated texture animation?

Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
01-20-2009 20:45
Ok, so I'm trying to use texture animation to keep load off the server and improve performance - but I still can't figure out how to synchronise this across multiple objects/prims.
There appears to be no way of telling more than one prim (even in the same linked object) to start animating at the same time...llSetLinkPrimitiveParams(...) can't be used to start animation, and there's no llSetLinkTextureAnim(...) function.
Though to be honest even if there were it wouldn't really help because I need to send slightly different parameters to each group of prims.
Any sort of trick that involves broadcasting messages via llSay(...) or llMessageLinked(...) simply doesn't work - even though when I print out the llGetTimeOfDay() that each prim thinks they're starting the animation at, they all report that they're starting within 0.01 seconds of each other, which should be good enough, but the result is just a mess.

As it happens I can (depending on the sim load) get reasonable performance with what I'm trying to do now (create a light show) using timers etc., but again it's unnecessary for the logic to happen on the server, and on heavily loaded sims it turns into a mess.

Is there really no way at all of ensuring that changes to multiple objects or prims are properly synchronised? I'm just playing around with scripting (only been signed up a week), and it was the first thing I wanted to be able to do! I can't be the only one...
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
01-21-2009 03:07
The only way I've found to "synchronize" a function is to have a chat comment or link command sent from an external source, one that all of the objects receive at the same time. There will still be deviation, but you can get it somewhat close by doing it this way. Since all objects receive the command at the same time, they all perform it at the same time. Of course, all scripts are cycled independently, which causes the deviation from one to another. There's no way to truly synch them as far as I know. You may have to resent the command again at regular intervals to help keep time.
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
01-21-2009 16:47
Best way is to make all the animation textures the same number of frames. and run them at the same speed. When you first add the scripts or make tweaks, the animations will appear out of sync.

Do a drag-copy of your object (or take and re-rez it), to sync everything up again.
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
01-21-2009 20:46
Actually it's exactly the same animation in every object/prim. But I haven't found any reliable way to get them to all play it in sync with each other.