Okay so here is my problem: I am using timer.performWithDelay to call a function that has its own parameters but whenever I call that function the delay does not occur. For example:
timer.performWithDelay ( 1000, fadeOut(splash, 750), 1 )
What this should do is after 1000 millisecond run the fadeOut function with parameters splash, and 750 one time but instead it just calls the fadeOut function right away without waiting the initial 1000 milliseconds. However if I remove the parameters and just call the function the function runs after the desired 1000 milliseconds.
timer.performWithDelay ( 1000, fadeOut, 1 )
That code works, however it forces me to put the parameters in the function and causes me not to be able to reuse the function for other objects. This is the function I am calling:
function fadeOut (variable, duration) --fades out an object over declared time
local t = duration
transition.to(variable, {time=t, alpha=0})
end
Also if I call the function without the delay but the parameters it works as well.
fadeOut(splash, 750) --this code works as well
So my real goal here is to be able to call a function with parameters in a timer.performWithDelay code. [import]uid: 6000 topic_id: 779 reply_id: 300779[/import]