That is correct. Thats exactly what i am checking. In collision method i am checking for Boolean value is its false than ignore collision and once it true i should kill the HERO (wich remove HERO out of screen along with chipmunk shape).Here's what I thought you would be doing. To ensure collisions between the hero and the moving object are ignored until the scaleTo action has finished (hero has hit the ground) the hero as a bool "hitGround" which is only set to true when the scaleTo action finishes. The collision handler for the hero and the moving object checks this bool and ignores the collision unless true.
if you know cocos2d engine than you can implement callback function on each action end. So what i m doing it i set hitGround = false before action begins and at the end (in callback function)i set hitGround=ture. and than remove HERo from screen with chipmunk object and set hitGround=false. In the same callback function i call another Action which is to change HERO's size to original and after it gets removed. I don't have code with me right now but i will post once i will reach home in the evening. but here sequence of execution of code.What I don't understand is your description of the bool. You say you set the bool to true when the action finishes (so do mean you set it in the update method when the t param is 1? You remove the hero, does that effect the chipmunk object (e.g. data member points to something that's gone)? Then you set it to false (when?) and in-between (need to know what code is run "in-between"). Also how is the bool begin used?
* set hitground = false
* COCOS2D = scale to action
* at end of action callbackfunction get called and in callback function
* set hitGround = true
* remove HERo from screen with chipmunk shape.
* set hitGround = false
* call another COCOS2D function to set to original size
so as soon i set hitGround = true collision function get called twice and i think ( I am not 100%) because of frame rate. I am not sure weather i am doing something wrong or implantation of what i want is wrong.
I WILL POST CODE WHEN I WILL REACH HOME.
Thanks for taking time and looking into my problem. I would really appreciate that.
Thanks
Sunflower