PDA

View Full Version : Locked Tokens



Maxxx26
September 22nd, 2009, 16:24
I have a quick question, what do I need to change to make tokens that are linked to NPCs in the combat tracker movable by players?

Would it even be possible to make this dependent on the Friendly/Neutral/Hostile indicator?

Tenian
September 22nd, 2009, 16:38
per https://www.fantasygrounds.com/refdoc/tokeninstance.xcp

Tokeninstances are listed as supporting the setModifiable method:

setModifiable

function setModifiable( state )

Flags the token modifiability status. Non-modifiable tokens can't be interacted with by the clients.

Only scripts running on the session host can set this property.

Parameters
state (boolean)
A value of false to disable client interactions with the token, or true to allow them.

Maxxx26
September 22nd, 2009, 16:52
Thanks, with that information I found the line in the script that makes the tokens modifiable by players.