creating a table: onUpdateActionButtons

Game development with Board Game Arena Studio
Post Reply
User avatar
RicardoRix
Posts: 2548
Joined: 29 April 2012, 23:43

creating a table: onUpdateActionButtons

Post by RicardoRix »

A bug report has been raised against my game:
https://imgur.com/a/wzRsC1n
https://boardgamearena.com/bug?id=14374

The weird thing is, that the game hasn't even started, they are waiting in the auto-mode lobby. Every 1 second the message appears. It comes from the JS onUpdateActionButtons(): being called with 'stateName=gameSetup' as a parameter.

why is the onUpdateActionButtons() function being called every second before the game has begun?
User avatar
Bids
Posts: 72
Joined: 02 April 2019, 18:10

Re: creating a table: onUpdateActionButtons

Post by Bids »

Hey Ricardo and others,
unfortunately I cannot answer your question, because I'm a less experienced developer than you. I actually also have a question about the functioning of onUpdateActionbuttons. Where does the argument, in your case "gamesetup", gets defined? In my game it seems to start with the argument "playerturn" (based on the hearts tutorial) but I can see that it has passed by the st-functions of two other states because of the notifications the functions display. But at the same time, the notif_ functions in the .js file don't work. I will explain it a bit better hereafter.

I want to display the top card of a pile at the start of every new trick. I did this by implementing this in the notif_newTrick function, which works fine for all tricks except for the first trick. So I was trying to check why this function has not been called, while it did pass through the stNewTrick function. So my guess is that this has to with the onUpdateActionButtons which triggers the first change of states at the beginning if I understood it correctly.

I'm hoping that the person answering Ricardo's question can give a general explanation on onupdateActionButtons such that maybe both of our questions can be resolved at once. If not, I will open a new topic for my question.
Thanks in advance.
Post Reply

Return to “Developers”