Page 1 of 1

Looping Animated Textures

PostPosted: Sat May 01, 2010 4:37 pm
by Doobes
Hey all!

I've read and reread the Animated Textures tutorial on the Wiki, but haven't been able to get layer animations to stop looping. Here's the AlcScript I've been using, based on the Wiki entry:

Code: Select all
DoorBtn2:
    visual:
        matanims:
          - mat: DoorBtnPad2
              flags:
               - stopped
          - mat: DoorBtnPad3
            flags:
              - stopped


And the looping layer animations keep going. I've deleted the SAV file each time I've modified things, plus tried the script on other objects with layer animation and no luck stopping any of them either. Any ideas?

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 4:14 am
by D'Lanor
The indentation for your DoorBtnPad2 is wrong. "flags" should be aligned with "mat".

DoorBtnPad3 is correctly aligned, but I don't think the parser gets that far due to the error above.

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 7:43 am
by Jojon
I found myself having to make responder events, that sends stop and reset anim command messages to the materials, prior to letting the player see them -- if you figure this out, please share, so that I may remove that cludge... :9

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 8:55 am
by Doobes
The spacing didn't show up correctly when I pasted it. It's as you describe, D'Lanor, and it still doesn't work.

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 9:52 am
by D'Lanor
The script works fine. In the age I am (or I should say "we are" since it is a team effort) working on it is used successfully with no less than 13 texture animations. Most of them are opacity animations though. Nobody in our team has had any problems.

Are you sure you are referencing a material name there? No typos? Case sensitive? And did you make sure the material is single user? If it is a multiple user material then the next object using it might turn on the loop again.

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 2:37 pm
by Doobes
All that stuff is good. But check this out:

I tried to change the material names to a shorter name and changed the AlcScript to match. However, at the very end of the export process, it pops up with this message:

AttributeError: 'NoneType' object has no attribute 'write'


Changing the materials back to their original names corrects this. Any idea what that may mean?

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 3:18 pm
by D'Lanor
I managed to reproduce that error. In my case I had the material referenced in my responder as well and "forgot" to change the name there.

The AlcScript section under "visual" however does not throw an error if the material does not exists.

Re: Looping Animated Textures

PostPosted: Sun May 02, 2010 4:48 pm
by Doobes
Well, it's good to know it's not just me then!

I'm thinking...taking from Jojon's post, is there a specific way to shut the textures off initially via a responder instead? Perhaps a region surrounding the link in point? I've noticed with my door button responder(s), which the object with the textures is part of, that it manages the textures I'm dealing with quite well after using the button...they just wouldn't shut off at the beginning to make it look right. It would have to be only once, as I'm trying to compensate for multiplayer (hopefully, as dealing with SDL and Python was just TOO much fun :lol: ) for inclusion in open source URU someday and wouldn't want the textures to reset if someone linked in while others were using the button.

And thank you for the help, D'Lanor, I really appreciate it!