On Sun, Jun 20, 2010 at 3:01 PM, Ivo Fokkema <[email protected]> wrote:

> 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
>
>


This was the cocos 0.3.0 behavior, in current svn trunk  that type of
restrictions has been eliminated. You can use the svn version, it is in good
shape.

Also, for an alternative way on smoke, look at the example in
test\test_particle_smoke.py ( in the trunk of svn repo), and the other
particle examples.

Probably you know this, but anyway the svn repo and web interface can be
reached at
http://code.google.com/p/los-cocos/source/checkout

--
claudio

-- 
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