Using the advice from
this thread, I'm trying to get an animated sprite sequence to appear on screen. This script below works fine...
-- Adapted from smallg script
local prompt_wasd_img = {}
local prompt_wasd_spr = {}
local hi = 1
local delay = 15
local spritetriggered = 0
function prompt_wasd_keys_init(e)
for a = 1, 218 do
if a < 219 then
prompt_wasd_img[a] = LoadImage("gamecore\\sprites\\wasd\\wasd_"..a..".png")
prompt_wasd_spr[a] = CreateSprite(prompt_wasd_img[a])
SetSpriteSize(prompt_wasd_spr[a],21,-1)
SetSpritePosition(prompt_wasd_spr[a],200,200)
SetSpritePosition(prompt_wasd_spr[1],200,200)
end
end
end
function prompt_wasd_keys_main(e)
--Prompt ("spritetriggered="..spritetriggered)
if g_Entity[e]['plrinzone']==1 and spritetriggered == 0 then
if GetTimer(e) > delay then
StartTimer(e)
if hi < 218 then
hi = hi + 1
SetSpritePosition(prompt_wasd_spr[hi-1],200,200)
else
SetSpritePosition(prompt_wasd_spr[hi],200,200)
hi = 1
end
SetSpritePosition(prompt_wasd_spr[hi],40,65)
end
if hi == 218 then
spritetriggered = 1
end
end
end
...but it would be great if I could delay the playing of the image sequence for 5 seconds. This particular sequence happens right at the beginning of the level and I don't want the beginning chopped off/obscured by the fade in. I've been playing around but I think because the script already uses a timer, I'm getting it all muddled
AE
P.S. on an unrelated note, is there any way to change the length of the fade in called by TriggerFadeIn ()?