PDA

View Full Version : Control only visible for a specific player



Tabulazero
June 22nd, 2019, 14:38
Is it possible to script a control so that it is only visible by a specific player ?

damned
June 22nd, 2019, 14:52
Is it possible to script a control so that it is only visible by a specific player ?

I would think the answer would be yes.
Have a look at the Combat Tracker - you can see that there is two versions - one for player and one for the GM.
What about when you share a note/story/item with a specific person?
Should be enough examples to get you started... :)

Trenloe
June 22nd, 2019, 16:43
Look at the windowcontrol setVisible Interface: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp#setVisible

You'd need to have LUA code that would run on the player side (not the GM side) and identify which player (FG identity - see the User FG package: https://www.fantasygrounds.com/refdoc/User.xcp) was active and running the code based off the player.

Tabulazero
June 22nd, 2019, 17:40
Basically what I am trying to come up is a window whereby both a player and the GM would bet a number of dices against each other. I am trying to find a way which would prevent each party from knowing how many dices the other party has committed, hence the idea of controlling who sees what.

damned
June 23rd, 2019, 02:12
Basically what I am trying to come up is a window whereby both a player and the GM would bet a number of dices against each other. I am trying to find a way which would prevent each party from knowing how many dices the other party has committed, hence the idea of controlling who sees what.

At a guess you would build something like the CT...