[Ask] for bypassing TimeHits and HitMax in Blocks

hi everybody,

Before asking my problem, I would like to thank the whole team for the help provided, I have made a lot of progress, to all of you, I ask for more, so here is my problem:
I was able to double the size of the ball during the game but I have trouble with the timehits and the Maxhits, I wanted that when the boosted ball hits my tagged blocks, they destroy themselves instantly despite the number of maxhits and timehits. I can’t put the right statement.
thank you in advance

Hi,

Since you successfully managed to scale the ball up, I’m sure you will also be able to solve the remaining problem. :slight_smile:

I can’t put the right statement.

This sounds as if you already have an approach. Would you mind sharing it here? I don’t want to post a solution and rob you of the opportunity to solve this problem yourself.

Since it’s already late here, I’m posting a few hints, though, in case you are stuck and need some advice:

A few hints

I assume you have an OnCollisionEnter2D method. Have you already watched the video on tags? If not, do that or look the tag up in the Unity API. Then look the OnCollisionEnter2D method up. It comes with a parameter inside its parentheses. Look the type of that parameter up. Try to find a way to get the tag of the other colliding game object. Log it with a Debug.Log into your console.

Once you have that, try to write a condition for an if-statement and put your idea into the code block.

Hopefully, this helped. :slight_smile:

in reality I would rather that when my big ball hits the blocks they destroy themselves instantly only my big ball not the normal ball

Privacy & Terms