On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Hm. Well, the first step (if you haven't done it already) would probably be stubbing out keyboard navigation, with a card- or deck-level script that overrides navigate[] to do nothing, to make sure the player can't accidentally go to your "protected" card without using editing tools:

on navigate do
end

Then you need some way of keeping track of whether cards have been "visited". Several ways to handle this. If you had an invisible checkbox on every card that needed to be visited named "visited", you could record visits something like so in each card's script:

on view do
  visited.value:1
end

Or even handle it automatically with a deck-level script fragment (not inside a function handler, just bare):

deck.card.widgets.visited.value:1

Left bare, it will execute whenever *any* event is processed. On cards without a "visited" checkbox it will have  no effect.

Check if every card with such a checkbox was checked using a query:

if min extract value..value where value from deck.cards..widgets.visited
  # ...
end

The ".." can be read as "at every index". The minimum of a list of 1/0 values is equivalent to logically ANDing them all together.

And you might want a button somewhere for resetting all the visited checks:

on click do
  deck.cards..widgets.visited.value:0
end

The nice thing about this approach is that as you add new cards in the future, you can decide on an individual basis whether they need to be counted toward "visiting everywhere".

Make sense?

I don’t get where i’m supposed to enter the minimal number of cards visited to allow a new thing ? 

If i have a button, and if its clicked whereas all cards have not been visisted i want to display a text (with dialogizer) / and if the value is high enough another text is displayed, then go to the new unlocked card 

(+1)

You originally stated your goal as "all other cards have been visited".

In the model I describe above, cards whose visitation can count toward the total are each given an invisible checkbox (with a consistent name) that keeps track of whether that particular card has been visited yet. Cards that do not have such a checkbox don't count toward the total, so for example you may not need one on a "title screen" card.

If you only want to know whether some threshold has been exceeded, the query I showed for checking whether all such cards have been visited can be modified to instead count how many have been visited, and compared to some threshold (say, 10) like so:

if 10<sum extract value..value where value from deck.cards..widgets.visited
  # let the player go to another card...
else
  # tell the player they can't go yet...
end

If you only kept a single counter somewhere to track card visits, there would be no way to identify repeat visits to the same card, which is probably not what you have in mind.

If you used a different naming convention (call some checkboxes 'visited1', some 'visited2', etc?) and modified the queries I describe accordingly, you could track several disjoint or partially-overlapping groups of "visited" cards.

(+1)

It's good for me !!!!