Now that the ruler functionality is complete, the next step is to figure out ETA’s initiative and token spawning functionalities. Both of these require UI entities that disappear and reappear when the relevant buttons are pressed.
However, a couple of roadblocks present themselves: how to make the UI entities disappear and reappear, how to make those UI entities opaque, and how to keep mouse input from activating the tiles behind the UI.
Here is a link to the relevant script. Lines 31-34 & line 64 are the ones meant to make the token spawner window disappear and reappear. It’s partially based on Will Eastcott’s WebGL Chess game’s “button” script, which I have forked and am attempting to grok. Hopefully WebGL Chess doesn’t use legacy scripting.
A big thanks to everyone who’s been helping. Your help has been invaluable.
Thanks, Yaustar. I’ve fixed the render order, and now I have another problem with the token spawner. In order to make scripting the token spawner functionality simpler, I dragged and dropped all of the token spawner stuff into the token spawner button.
Unfortunately, this causes some strange behavior with the token spawner.
If you follow the link, you can see on lines 74-79 that are causing the problem. By all rights, if the event’s texture asset matches the passiveAsset, then the script should execute. And as you can see here, they do in fact match.
So, what’s the problem? Why isn’t the script working?
On lines 89-114, there is a block comment. If you swap the uncommented script above it with the script below it, you’ll find that the script below enable and disable tokenUI just fine.
I know this question is disjointed and confusing, and I’m sorry. But I’m just…lost.