I'm using a slice collection for text box visuals for better or for worse, but I'm loading actual textboxes and then hiding them to handle the mechanics of them. This works fine when I use the show textbox command, but there's a frame of delay with automatic textbox advancing.
this works fine. However, in my main game loop, when I call setSliceVisible(lookupSlice(sl:textboxroot), false), it shows the textbox for a frame before hiding it. How do I intercept the draw call for a textbox before it shows up? Right now, I'm working around it by setting "show box" to false on all textboxes, but I'd like to use a scripted solution if it's possible.
Set sl:textbox layer invisible rather than sl:textbox root. The root is the container slice for a single textbox, so it's created and deleted as textboxes appear. The layer is permanent.
When you use the "show textbox" command (or "use npc") the textbox is created immediately so you can manipulate its slices (note: there is a backcompat bit that disables this), while textboxes opened any other way (from outside the script interpreter) will already be visible for a tick before any script can modify them. This is a problem that needs to be improved. I want to add a script trigger run whenever a textbox is opened.