Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: zpaolo11x on September 18, 2018, 01:06:20 AM
-
I want to do this: take a screenshot of AM and then load it as an image file.
I can easily write a routine that scans through the AM folder and selects the last screenshot pathname. My idea was to do something like, in a on_signal routine:
generate the screenshot through signal("screenshot")
run through the folder and get the filename
add the filename to the image
The issue is that, as far as I can see, it takes some time to create the screenshot so the routine finds the previous one. Is there a way to wait until the intended file is created?
-
Let me rephrase this: I want to take a screenshot each time the Transition.ShowOverlay happens, but if I do this:
if (ttype == Transition.ShowOverlay){
fe.signal("screenshot")
}
the screenshot is created only _after_ I leave the overlay menu. Is there a workaround for that?
-
This is the status so far: with a custom control from "on_signal" I can find the latest screenshot in the AM folder, launch another screenshot, then I let the ticks routine find the newly created screenshot and load it into a surface with shaders.
Sadly I can't seem to make it work with overlay display calls :(