PDA

View Full Version : tokeninstance.setVisible()



Foen
March 23rd, 2008, 08:46
I am struggling here *sighs* so any help would be appreciated.

I am trying programmatically to change the visibility of a tokeninstance using the setVisible() method, but it seems impervious to my attempts (the token is resolutely visible). I _am_ able to do it manually by using the context menu, but it fails silently when I try to do it from code.

The code is called from combattracker_token.acquireReference among other places, where I'd like to set initial combat tracker tokens to be visible or invisible depending on the circumstances.

BTW, the default state for dropped NPC tokens is 'visible', is that normal?

Any ideas? :confused:

Stuart

Edit: corrected a split-infinitive.

Foen
March 26th, 2008, 23:33
*Bump?*

(I'm keen to know if I've misunderstood the documentation)

joshuha
March 27th, 2008, 18:12
It appears to be a bug. Just tested this and the visibile property is being set but the token is not being hidden (or 50% transparency on the GM).



ref.setVisible(false);
if ref.isVisible() then
print("Still visibile");
else
print("Hidden");
end


This will print Hidden but not actually hide the token. Submitting this issue to the devs.

Foen
March 27th, 2008, 19:02
Thanks Joshuha.

Bidmaron
December 27th, 2008, 04:54
With all the work the developers recently did with tokens on selecting only non-transparent portions of tokens in 2.3.0, I can't believe they didn't fix this one. If they did, it isn't in the update description of any update since this date. Is this still an active bug?
This bug is not listed in the bug/feature request list on this forum either, but I will add it.

Foen
December 27th, 2008, 06:43
This has been fixed, thanks.

Stuart