How to Display Text during collision?

Hello Guys,
Need a Quick Help. I'm creating my first game using Cocos 2D and Box 2D and would require help on how to display text during collision. Criteria is very simple. Using a stone and a slingshot i need to hit the objects falling from above. Each object has its own points and features. For one of them i need to implement, if the stone destroys more than 3 objects, the word "combo" should come up on screen and gradually fade out. Will be eagerly waiting for your reply and suggestions.

Regards,
Karthik
This is more of a game-level change; just find a way to store the data you need to display in the contact, and display it afterwards.

-P
Hi karthik,you can find similar post here.Instead of using sprite.You can use CCLabelTTF

Code: Select all

CCLabelTTF *label=[CCLabelTTF initWithString:@"combo" fontName:@"Market-felt"fontSize:13];
label.position = ccp(sprite.position.x,sprite.position.y);
[self addChild:label];

Original thread: https://box2d.org/forum/viewtopic.php?t=6088