Author Topic: Event to detect what type of projectile hit a brick?  (Read 563 times)

Is there a way to determine if a bullet hit a brick or really any specific type of projectile?

WhateverProjectile:onCollision. Here's an awesome snip of code describing what i'm saying, from one of my scripts:
Code: [Select]
function ShovelProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal) {
dowatever();
Parent::onCollision(%this, %obj, %col, %fade, %pos, %normal);
}
(Inside package!)

Oh by the way, this should go in Coding Help.

I think he was looking for an event-based solution to this, which there really is not. You have to code your own input event.

no, he explicitly stated "event" in the title, this does not go in coding help.

OP, VCE can do this.

/noeditathelp
Oh well, sorry then. In that case, my code snip is great workaround if He doesn't want to use VCE, lol.

no, he explicitly stated "event" in the title, this does not go in coding help.

OP, VCE can do this.
How would I use vce to do this?

pretty sure it's
onProjectileHit > self > VCE_IfValue [ <var:br:


no wait, it's VCE with an extension that's on RTB. that's right. search for it, it shouldn't be too hard to find. it gives examples too