Is it possible to select frames from a GIF? For example if I have a GIF with 5 frames, can I select the 2nd frame?
[url]http://gif-explode.com/[/url] This works well for me.
What I actually wanted was to select frames IN Lua. But thank you for the quick reply.
Pretty sure you can't. Can you even load a gif in-game?
[QUOTE=Kevin;44516310]What I actually wanted was to select frames IN Lua. But thank you for the quick reply.[/QUOTE]
Ah it appears I misunderstood what you required. I apologize.
[QUOTE=Robotboy655;44516340]Pretty sure you can't. Can you even load a gif in-game?[/QUOTE]
maybe he means animated vtf?
if so i think there's a way. i can remember trying a while ago (i dont think it ended well)
[QUOTE=Kevin;44516310]What I actually wanted was to select frames IN Lua. But thank you for the quick reply.[/QUOTE]
You might be able to do something crazy with an HTML panel, some JS to freeze the frames and GetHTMLMaterial
[QUOTE=Robotboy655;44516340]Pretty sure you can't. Can you even load a gif in-game?[/QUOTE]
No, I actually meant an animated vtf, as rejax also wrote.
[code]YourMat:SetInt( "$frame", frame )[/code]
Frames are from 0 to N - 1.
[QUOTE=Kogitsune;44521767][code]YourMat:SetInt( "$frame", frame )[/code]
Frames are from 0 to N - 1.[/QUOTE]
Oh, does this work? Thank you! But a little question: What do you mean by N - 1?
[QUOTE=Kevin;44521847]Oh, does this work? Thank you! But a little question: What do you mean by N - 1?[/QUOTE]
If there are N frames, then the range of accepted input is from 0 to (N - 1). This amounts to N frames.
[QUOTE=dingusnin;44521870]If there are N frames, then the range of accepted input is from 0 to (N - 1). This amounts to N frames.[/QUOTE]
Oh so basically N is how many frames there are in the material?
[QUOTE=Kevin;44521888]Oh so basically N is how many frames there are in the material?[/QUOTE]
Correct.
[QUOTE=dingusnin;44521906]Correct.[/QUOTE]
Ah thank you, this cleared it all up. Fast replies and stuff. =]
Sorry, you need to Log In to post a reply to this thread.