Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

zazz module issue

A topic by olszoj created Dec 23, 2023 Views: 258 Replies: 9
Viewing posts 1 to 2

hi

i just updated to decker 1.36 and am working on something made on an older version(1.30) but i have a problem

i have some cards that use the flipbook and bounce function, but when the page is viewed (in interact mode) it takes the player to the first card in the deck,   on some other cards there is no issues with the function, nor were there any issues before updating

all i have done to my file is change "extract first arg where arg..type="image" from" to "first extract arg where arg..type="image" from" to fix broken contraptions, could that be the source of problem?  i have no idea what if im doing something wrong!

Developer

There are only two ways to cause Decker to navigate to another card: calling the go[] function, or setting deck.card. Zazz itself doesn't do either of these things, so I don't see how it could be the direct cause of the issue you describe.

The normal way to call Zazz functions is from in a self-retriggering view[] event handler for a card, as in the example:

on view do
  zazz.flipbook[frame horses 0.02 (range 15)]
  go[card]
end

If anything in your scripts is overriding the value of the variable "card", it would break this idiom; for example, naming a widget "card".

The first thing I would try to diagnose such an issue is open the listener at the problematic card (in widget mode), type

card

and then evaluate it (press shift + enter). If the result is anything but

<card> 

you have your culprit.

i havent found any culprits this way鈽癸笍 but when i remove go[card] from the script on the problematic card then the player is not sent to the first card anymore, but ofcourse then flipbook isnt moving. if im missing any other obvious thing let me know i am a noncoding simpleton

Developer

Try making a copy of your project and stripping it down to the smallest deck that still exhibits the problem. Remove all the cards, scripts, modules, contraptions, etc you can, a few pieces at a time, until you narrow down the conditions of the bug. 

In the process of removing things you might discover the answer on your own, and if not I can take a look at your simplified example. It's always possible there's some sort of bug in Decker itself.

(+1)

thanks for this suggestion! i now found that a contraption i made (just a resizable picture, didnt put any script) is the actual source of this issue.So i guess its just that the contraption and flipbook now suddenly wont work together on one card?  u can see here 

Developer

Ugh, shit. The problem has nothing to do with zazz, or with your code; it's a regression in Decker. The contraption is bubbling its view[] event to the card (which should never happen). As a temporary workaround, add an empty view event handler to any contraptions which don't otherwise do something with view[]:

on view do
 
end

Thanks for your help in identifying this issue.

(1 edit) (+1)

thanks for explaining ! &sorry to bother u on christmas馃槶

Developer

I believe I have this fixed; the version of web-decker on beyondloom incorporates the patch, and it will be included in the next binary release.

Developer(+1)

This issue is corrected in v1.37.

(+1)

Yippeee!!!!