0 votes
by (180 points)

Hey ! Trying to respect the 3 developers rule (so 3 days max on a bug), I'll have to ask the community this time.

In my game, there is a layer system, and I use gifs for my characters. They just don't want to throw themselves back once they've played.

If I play again a scene where there is this gif, even if it is another passage, the GIF does not launch itself any more. Basically, it throws itself only once during the whole game in progress.

Here's a pic of the scene.


And the content in the passage :

<img style="z-index: 1; position: absolute; left: 760px; top: -406px;" src="image/corey.gif"/>

''Corey'' : Hey, easy, man, enjoy it before you lose your mind with complicated stuff !<br>

The background is on the Stylesheet.

It's my biggest bug right now. I've looked everywhere, but nobody's had a similar case. I use Sugarcube 2.X.

Thank you in advance for your answer!




1 Answer

+1 vote
by (44.7k points)
edited by

Rather than reinvent the wheel, I'd say just grab the JavaScript source from GIFPlayer and incorporate that into your code:



That will even let you trigger GIF animations using a <<timed>> or <<repeat>> macro or something if you wanted to trigger an animation of the character blinking or something like that.

by (180 points)

Yes thanks !

After entering the code, the gif reads itself each time.

For the others, here is the user code :

<img style="z-index: 1; position: absolute; left: 760px; top: -406px;" img class="corey" src="image/corey.gif" data-label="play">