Jump to content

Linking objects question.


Riodan
 Share

You are about to reply to a thread that has been inactive for 3469 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So.. 

I make animated signs, basically I'm starting to get into using multiple prim animated signs, here's the issue I have:

I create 3 prims, main prim, and 2 child prims.   Each has an animation based script in it.   When I end up linking the 3 together using the link button, the main prim continues to function correctly, but the child prims, suddenly revert to the original image, and stop working completely.   What are my alternatives?

 

Link to comment
Share on other sites

It's hard to say without seeing the scripts involved. Also, what do you mean when you say the child prims "revert to the original image"? Is the texture changing to something else, or is the animation simply stopping?

Do any of your scripts have a changed() event that triggers on CHANGED_LINK ?

Texture animation is a property of the prim which can generally persist once it is set. You can even remove the script and the animation will continue to play. I believe shift+drag copying is one of the few cases where the property is lost and not applied to the copy prim. But if you say the animation is stopping when you link the prims, my suspicion is that you have something in your script which messes up when the linkset is formed. Either a changed event, or llSetLinkTextureAnim() which a link number target of zero.

One alternative I can suggest (without knowing more) is to get rid of the child scripts. you most likely don't need them. Instead, just have one script and use llSetLinkTextureAnim() to set the animation for each child prim. Fewer scripts is almost always more desirable and efficient.

Link to comment
Share on other sites

It's really just a simple script for each prim:

 

default
{
state_entry()
{
llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 1.0);
}
}

 

The speed and sides are different on each prim, but that's pretty much it for all 3 prims.

 

 

Link to comment
Share on other sites

the original image is a texture containing (12) 256x256 images contained in one 1024x1024, the way the script work is it slideshow displays each section of the large image in succession, much like a cartoon slide reel.  I'm under the impression that this is the only viable way to animated images in second life as animated .gif don't work, and I've heard flash doesn't work either.

 

Link to comment
Share on other sites

If that's the script for all prims, then you could get around this problem by linking the signs first and then using scripts to apply the animations as desired.

I would still recomend using a single script with llSetLinkTextureAnim() so you can easily control which child gets which animation without worrying about conflicts from other scripts elsewhere in the linkset. Also, if you only need to set the animation, and don't need to turn it on or off later on, then you can safely delete the script(s) from your object.

Why your animations break upon linking is puzzling to me - it may be a bug. If you can recreate the problem reliably, you may want to consider reporting the problem with the bug tracking tool JIRA.

Link to comment
Share on other sites

Yes, that is how texture animations work in SL. You basically have an image containing each frame of the animation in succession. The function actually works by telling the viewer to manipulate the texture repeats/offsets behind the scenes. It's mostly a client-side effect. That is why you can't set the repeats/offsets of an animated face while the animation is playing.

For reference, this is only one of several animation methods. You can also have animation modes where the image smoothly slides or rotates across the face. But they all work with a static image.

Link to comment
Share on other sites

The oddity that I've noticed, is when you have the prims scripted individually and then you link em together, at first the animations will fire just fine, but given time, they just stop, and you see the entire image with no further animation happening, so yeah, I mean logically you would assume linking an already scripted object to another already scripted object would work in either scenario, but clearly it doesn't, easily reproduceable, so I may indeed report this. 

I certainly appreciate the feedback, thank you Fenix :)

 

Link to comment
Share on other sites

Seeing the entire texture is actually how it appears to the server: with repeats of <1.0, 1.0> and offsets of <0.0, 0.0>. So it could be that when the animation "breaks", the viewer defaults to those settings.

Another thing: Selecting or de-selecting a prim/object will restart the animations. When you link the objects, does the animation immediately sop, of does it happen when you de-select the object? The bug may be that for some reason, the animation doesn't restart and instead reverts to what the server sees as far as texture repeats/offsets.

Link to comment
Share on other sites

Texture animations are prim properties. That means you need only a script to start or stop them but no script is needed to keep it running.

Texture animations are fully viewer sided. The server is not involved. For the server it's just a few numbers in the prims data record. So if things don't work it's a viewer issue.

I noticed disturbances in this animations on linking/unlinking. But sooner or later things are running again. Leave sim or log out and come back. I will make a test later to see if its really viewer only and if I remember that correctly.

Edit
------------

Update: I see no more disturbances when linking animated prims. Works all fine as it should. So I can not confirm the observations of the OP.
Proofs that is is no server sided problem and no script problem.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3469 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...