How to pause a action?

how to pause a action run by a node,and then start it again in future?

pauseSchedulerAndActions()
resumeSchedulerAndActions()

You can also get an action by tag and pause it :slight_smile:

Should work :slight_smile:

Hopt it helped.

cheers

trila Yang wrote:

how to pause a action run by a node,and then start it again in future?

add the action to CCSpeed like:
@
CCSpeed speed = ;
speed.tag = some-tag
@
pause:
@
CCSpeed
speed = (CCSpeed**) ;
speed.speed = 0;
@
resume:
@
CCSpeed**speed = (CCSpeed*) [self getActionByTag:some-tag];
speed.speed = 1.0f;
@

2 Likes

Speed action sounds really interesting. Thanks.