how do i animate sth going to/from playerPanel

Game development with Board Game Arena Studio
Post Reply
pumpkinYellow
Posts: 4
Joined: 08 December 2025, 20:29

how do i animate sth going to/from playerPanel

Post by pumpkinYellow »

i am having animations of things going from my boards toward the counters in the playerPanel, as well as the other way around. I am NOT animating or manipulating any divs inside the playerPanel, but i am calling

Code: Select all

const playerPanel = document.getElementById('player_board_' + player.id);
so i can tell my animations where they start or end.

I am getting a warning when building this project

Code: Select all

The player panel elements should not be accessed directly, please use the player panel functions.
and so the questions: can I ignore these as my usage is justifiable? am i doing this wrong and there is a better way? or is there no better way but what i am doing is not allowed?

PS best i can figure out the "player panel functions" just let me manipulate the counter values, not learn where they are on the page
User avatar
Jonathan2004
Posts: 46
Joined: 21 April 2020, 19:06

Re: how do i animate sth going to/from playerPanel

Post by Jonathan2004 »

Hi

Maybe the function you need is

Code: Select all

this.bga.playerPanels.getElement
, see documentation here : https://en.doc.boardgamearena.com/Game_ ... ers_panels
User avatar
AmadanNaBriona
Posts: 48
Joined: 17 March 2018, 18:52

Re: how do i animate sth going to/from playerPanel

Post by AmadanNaBriona »

Just use the slideOutAndDestroy method (if you are making something go to the panel and then disappear), or the slideIn method (to come from the panel to a location).
Post Reply

Return to “Developers”