Working in pure JS on this; I have a script that runs a custom scene. I build a scene with a background and some menus, giving a sort of visual novel look.
On initial load of the scene, the background image is loaded, and we loop through the NPCs and load an image for each of them. Then setup the menus.
Right now, the background image loads perfectly fine. We're golden. As we navigate the "rooms", each subsequent background image is loaded fine.
The NPC images, however, have a hangup. On the initial load, they don't show. On a subsequent load, or when one of the scripts "reload" the room, they do. If the same image is referenced elsewhere, it shows, but new "npc" images take that first round off.
The background and NPC elements are created as new Sprites, sans a provided file. As each of the loads occurs the bitmap is set to an image loaded via ImageManager.loadPicture.
A later pair of elements are loaded as Sprite_Buttons, which show and behave perfectly fine.
I've tested a few things out; disabled the background image, so we're not creating/loading that, and same result. Loaded only one NPC/cut the loop, same result. The image files themselves, the background images have a larger file size than the NPC images, so it shouldn't be a cache/memory issue.
Any ideas?
On initial load of the scene, the background image is loaded, and we loop through the NPCs and load an image for each of them. Then setup the menus.
Right now, the background image loads perfectly fine. We're golden. As we navigate the "rooms", each subsequent background image is loaded fine.
The NPC images, however, have a hangup. On the initial load, they don't show. On a subsequent load, or when one of the scripts "reload" the room, they do. If the same image is referenced elsewhere, it shows, but new "npc" images take that first round off.
The background and NPC elements are created as new Sprites, sans a provided file. As each of the loads occurs the bitmap is set to an image loaded via ImageManager.loadPicture.
A later pair of elements are loaded as Sprite_Buttons, which show and behave perfectly fine.
I've tested a few things out; disabled the background image, so we're not creating/loading that, and same result. Loaded only one NPC/cut the loop, same result. The image files themselves, the background images have a larger file size than the NPC images, so it shouldn't be a cache/memory issue.
Any ideas?