Hi guys,

I've been getting frustrated for a couple of hours now on trying to
get to start a repeated sequence after a certain delay.
What I would want, is something that resembles smoke coming from a
certain point on the screen. I was thinking to create a certain number
of reusable sprites, which fade out and move away slowly for a couple
of seconds, and then I want to place them back in the beginning, fade
in, and restart the sequence. Something like:

def SmokeFadeOut():
    return(MoveBy((-150, 0), 4) | FadeOut(4) | ScaleTo(3, 4))
def SmokeRestart():
    return(MoveBy((150, 0), 0) | FadeIn(0) | ScaleTo(1, 0))
def SmokeFade(delay):
    return(Delay(delay) + Repeat(SmokeFadeOut() + SmokeRestart()))

for i in range(0, 5):
    smoke = cocos.sprite.Sprite('smoke.png')
    sprite.add(smoke)
    smoke.do(SmokeFade(i))

But cocos is throwing an exeption: "You can only sequence actions with
finite duration, not repeats or others like that"
Why? I can't see the reason. I've been trying to work around it, but
none of the solutions I thought of, work. Do you guys have any
suggestions?

Thanks in advance!

Ivo Fokkema, Netherlands

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to