Create account / Log in

create a counter that keeps track of clicks of a button

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

create a counter that keeps track of clicks of a button

Postby bigdirt32 » April 20th, 2012, 11:59 pm

I am trying to create a game piece that when placed on a the map board will start counting the number of times I click on an action button. Using this to track rest for players in a Basketball game I am creating. I have a start stack with a global property that keeps the count of how many times an action button is clicked. I have several multi-action buttons setup so that CTRL-I is used to increment the count.

Thanks.

Steve
bigdirt32
 
Posts: 8
Joined: February 16th, 2010, 1:01 am

Re: create a counter that keeps track of clicks of a button

Postby barbanera » April 21st, 2012, 8:50 am

You seem to have everything you need (the gp counter, the trait to increment it when the action button is clicked), what do you miss then?

Just a text label on the piece counter showing $clicks$ (=name of the gp counter)? And/or some trigger on it to do things when the counter reaches a certain threshold, maybe..
barbanera
 
Posts: 377
Joined: January 12th, 2012, 2:27 pm

Re: create a counter that keeps track of clicks of a button

Postby bigdirt32 » April 26th, 2012, 5:01 am

Yes something like that. So do I set a trigger to start counting on the counter when it is on the map board? I guess my question is how do I set the counter to know when to start counting . Example my card count is at 75 and a player is sits to rest. I put the counter on the player, which is a card by the way LOL and it starts to count how many cards that player is sitting out. Any advice?

Thanks in advance.
bigdirt32
 
Posts: 8
Joined: February 16th, 2010, 1:01 am

Re: create a counter that keeps track of clicks of a button

Postby barbanera » April 28th, 2012, 8:49 am

I am not sure I understand your example..

Do you mean something (the turn counter? some command on some counter?) triggers a phase A where some players are drawing cards from a deck, while another player has to sit out till N cards are drawn? And after N are drawn another phase B starts?

If so, then you could make use of the <deckname>_numPieces global property associated with a certain deck. Whatever starts phase A should set a global property CardNumber to be equal to <deckname>_numPieces. Then just add on the cards a trigger trait to trigger when <deckname>_numPieces = CardNumber - N and proceed to stop phase A and move to phase B.
barbanera
 
Posts: 377
Joined: January 12th, 2012, 2:27 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest