Skip to main content

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

The key idea here is that the functions provided by zazz need to be called repeatedly in order to drive animation, while dialogizer dialog boxes make script execution wait until they're dismissed.

In a fragment like

on view do
 zazz.wave[card wave_bus 0.002]
 go[card]
end

The "go[card]" statement at the end is telling Decker to send another view[] event to the card on the next frame, so zazz.wave[] gets called 60 times per second.

As noted in the documentation, while a dialogizer dialog box is open and dialogizer is internally waiting for the user to click the mouse, it continuously sends animate[] events to the current card. You could reorganize your script to separate out the "one-off" and "repeated" parts like so:

on view do
 play["bus_sound" "loop"]
 dd.open[deck]
 dd.say["The first message."]
 dd.say["The second message."]
 dd.close[]
end
on animate do
 zazz.wave[card wave_bus 0.002]
end

But note that animate[] won't be automatically called by Decker when a dialog box isn't open; it's just a convention made up by dialogizer!

A simple way around this might be to make one of the widgets on your card "animated" (Widgets -> Animated), which will ask Decker to send that widget a view[] event once per frame, so long as no other scripts are blocking it. You can then route that widget's view[] event to "pump" the surrounding card's animate[] handler by giving it a script like

on view do
 animate[]
end

And remember: you only need one "animation pump" like this per card! If you have a whole bunch of animated widgets routing animate[] to the card, you'll end up doing lots of invisible, unnecessary work!

Does that make sense?

(+2)

This made the trick! Thanks!