160place
WatchMaker Bug Tracking All the ideas and discussions
2 votes Vote

Chaining animations (wm_schedule)

When I try to get animations "chained", they are executed at the same time.

Example:
------------------------------------------
var_visible = true
tweens.anim1 = 0

function hide()
if (var_visible)
then
wm_schedule
{
{ action='tween', tween='anim1', from=1, to=0, duration=0.25, easing=linear },
{ action='run_function', run_function=myfunc(false) }
}
end
end

function myfunc(value)
var_visible = value
end
------------------------------------------

With that piece of code, I expect to perform an animation on tweens.anim1 during 0.25 seconds AND THEN to run myfunc. But both actions are executed at the same time.
I tried with the same result the next code:
...
{ action='run_function', run_function=myfunc(false) start_offset=1}
...

Sometimes I get a very weird behavior: the wm_schedule defined before is executed randomly and repeatly (but not entering in the hide function! like a memory lack)

Shalafi , 29.08.2016, 16:07
Idea status: under consideration

Comments

Leave a comment