Skip to main content

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

just a quick question: do you know why i might be having this issue where my say boxes repeat least twice when in interact view? it happens only on a few cards, and i checked to see if they had dd.close (which they do), but can't seem to figure out what is causing certain cards to loop their dialogues again. for reference, this is the script of one card that does the repeating thing:


(+1)

The `view[]` event can be fired on a card for several reasons, which aren't necessarily just the first time you visit a card. It's better to think of it as an event for refreshing the contents of the card, and you'll need some extra logic if you want to ensure it only ever fires once. This thread describes a few possible alternatives.

One additional approach not described in that thread would be to invent a new event, say "visit[]" in the card script:

on visit do
 dd.open[deck]
 # ... etc ...
end

And then send a "visit[]" event to the card in any script that navigates to the card. For example,

on click do
 go[thatCard]
 thatCard.event["visit"]
end

Since we just made up the "visit" convention ourselves, Decker will never fire it automatically, and we can make it happen precisely when it's appropriate, but all the logic for what to do "on visit" lives on the card itself, which can help keep things logically organized.

Does that make sense?

ah, thank you! with using the visit[] method, the dialogue boxes on the target page just don't appear, but the checkbox solution from that previous thread actually seemed to solve this issue. i just have to lock the boxes and hide them, but they still work pretty decent;y