Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Thank you for your detailed reply! I was indeed using colorgif already and had worked out how to hide it and make it appear when the button is pressed as you mention, but that was as far as I had gotten with it. Thank you so much for updating the gif contraption to make this work the way I wanted. I used your code and it all works beautifully now.

I have a small follow up question if that's ok (not related to gifs). I was wondering if there's a way to do the same thing with sounds as you did with the gif. So rather than waiting until the sleep ends before the sound plays, it could play as soon as the button is pressed. I have the code to start the sound on the same button as the code that begins the gif, but of course the sound only begins playing after the transition to the next card.

Sorry for all the questions, but your last reply was very helpful so I'd be remiss not to ask.

(+2)

There's no need at all to apologize for asking questions, especially when you've clearly done some experimenting and reading on your own before reaching out!

In a script like so:

on click do
 sleep[5*60]
 play["sosumi"]
end

Decker will wait five seconds before playing the sound. If you reverse the order of those operations:

on click do
 play["sosumi"]
 sleep[5*60]
end

The sound will begin to play immediately, with its playback overlapping the 5-second sleep.

You can also use sleep["play"] to ask Decker to sleep until all sound clips have finished play[]ing:

on click do
 play["sosumi"]
 sleep["play"]
end

See All About Sound for more detail and examples.

(+2)

That was surprisingly simple... thank you again :)