Author Topic: Causing a projectile to fake-kill a brick, but continue on?  (Read 457 times)

Is there some way to keep a projectile traveling after hitting and fake-killing a brick? If so, how?

Off the top of my head, I would run a function to recreate the projectile in the same trajectory after it triggers the oncollision with a brick that it can fakekill.

Which is more complicated than it sounds, but I'm guessing that's the route you want to go.

Hmmmm... looking at this script, I think I see how to do that.  A few things, though - how do I get the position of the bullet when it hit (and which variable in the new projectile do I set this to?), and how do I detect if the thing I hit is a brick.

The projectile will already have all the info you need when it collides with the brick
if you use MyProjectile::onCollistion you should be able to get the info out.

use trace(1) and dump() to see where the info is stored.