That is, for a loaded image to key out on white.
I've made this script (below), and it does the basic idea, but it's not quite what I want.
I have an alternative script based on the blood resource that does key out, but it uses specific imgDims and I don't know how to express "all" in LUA. Also, that one's a real hog at the moment.
One other question. How would I rewrite the dxDrawImage line to render a single random frame at a time, using setTimer to render the next frame?
Thanks everyone.
(BTW, I know the 0,0,0, line isn't necessary, but I couldn't figure out how to exclude it without the alpha turning into the address line.)
________________________________________________________________________________________________________
local rootElement = getRootElement()
local screenWidth,screenHeight = guiGetScreenSize()
local frame = {}
frame[1] = "images/noise_1.png"
frame[2] = "images/noise_2.png"
frame[3] = "images/noise_3.png"
frame[4] = "images/noise_4.png"
frame[5] = "images/noise_5.png"
frame[6] = "images/noise_6.png"
frame[7] = "images/noise_7.png"
frame[8] = "images/noise_8.png"
frame[9] = "images/noise_9.png"
frame[10] = "images/noise_10.png"
frame[11] = "images/noise_11.png"
frame[12] = "images/noise_12.png"
frame[13] = "images/noise_13.png"
frame[14] = "images/noise_14.png"
frame[15] = "images/noise_15.png"
frame[16] = "images/noise_16.png"
frame[17] = "images/noise_17.png"
frame[18] = "images/noise_18.png"
frame[19] = "images/noise_19.png"
frame[20] = "images/noise_20.png"
frame[20] = "images/noise_21.png"
frame[20] = "images/noise_22.png"
frame[20] = "images/noise_23.png"
frame[20] = "images/noise_24.png"
frame[20] = "images/noise_25.png"
frame[20] = "images/noise_26.png"
frame[20] = "images/noise_27.png"
frame[20] = "images/noise_28.png"
frame[20] = "images/noise_29.png"
frame[20] = "images/noise_30.png"
function randomframe()
dxDrawImage(0, 0, screenWidth, screenHeight, frame[math.random(#frame)], 0, 0, 0, tocolor (200, 200, 200, 5))
end
addEventHandler("onClientRender",rootElement, randomframe)