Destroy wall with projectile

Hello all,
I’m trying to remove a wall by shooting it down with no luck… What am I doing wrong?

Any guidance is appreciated;o)

Thank you in advance
//A

2 Likes

Here’s some sample code:

And here’s the relevant bit:

2 Likes

And if you only want to destroy certain tiles, there’s an easy tweak to the code:

1 Like

Love the idea and the help! This is the best forum.

2 Likes

Thanks @richard!

I totally get what you are doing… really clever. However it’s kind of a long way to go for removing a tile that should be just removed if the projectile overlaps it.

Anyways… this forum is amazing and teaching me lots of nifty stuff.

Best regards
//A

1 Like

good for my future updates! :slight_smile:

@izno thanks for the feedback. I agree this is not ideal, I’ve opened an issue for it here with a proposal for a new block.

1 Like

yes! add the new block!!! pls add it!!! :slight_smile: :laughing: :laughing: :laughing: :grin: :grin: :grin:

The sprite also can’t overlap the wall you’d have to use if mysprite hitting wall

I know this topic already got resolved, but I may have a fix that’s fairly simple. :arrow_down:
image
The code wasn’t working because you were using an overlap block, but because the tile was a wall, the projectile wasn’t able to overlap it. The code above typically works for me when I’m using projectiles to remove walls and stuff like that.
download
This is the code in action.
I hope this helps.