onHit or onBrickDamaged event

Author Topic: onHit or onBrickDamaged event  (Read 789 times)

Trying to find onHit event for melee weapons instead of onProjectileHit for ranged weapons.

There is absolutely no way to differentiate whether something is actually a melee or ranged weapon.

you can do some hacky workarounds by checking if the projectile has a short lifetime and extrapolating the range of the weapon from that. if its a raycast weapon like in T+T, its a bit harder to check, but any weapons that uses support_raycastingWeapons can have the same approach applied. anything else will be a lot harder.

if you just need it for a select few weapons like dueling melee and the like, you can build in checks for the attacking player’s mounted weapon in minigameCanDamage or something

It's possible to use VCE and this extension http://orbs.daprogs.com/rtb/forum.returntoblockland.com/dlm/viewFile4a10.html?id=612 to check the difference between weapon's projectiles. I'm pretty sure this is the closest you can get to using events as you can.