How to start an animated texture from the beginning

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Lazorinc
Posts: 8
Joined: Fri Oct 20, 2017 12:27 pm

How to start an animated texture from the beginning

Post by Lazorinc »

So what I'm trying to do is have a script that starts an animated texture from the first frame, but since I imagine the animdefs scroll through the animation, even when there's been a ReplaceTextures, it starts on a random frame every time. How would I go about having it start from the beginning?
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: How to start an animated texture from the beginning

Post by Nevander »

Well with ACS I'm pretty sure SetLineTexture will start any from the beginning provided you give it the beginning frame.
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: How to start an animated texture from the beginning

Post by Rachael »

Actually, from my experience with the timer code in GZDoom's source, it seems like animations tick in the background whether they are rendered or not, right from the very moment GZDoom launches.

In other words, if it doesn't work it's not doable, at least not via animdefs.
Post Reply

Return to “Scripting”