Author Topic: onWeaponHit and onVehicleTouch  (Read 559 times)

These two events, which I have never seen made, would be extremely useful for a lot of things.

onWeaponHit would be when the brick is hit with a weapon that isn't ranged. Like with the sword. That would be simple.

onVehicleTouch is when the vehicle touches the brick and triggers the event. Again, it wouldn't be that hard.

And that's it. Not much, but I would really like to see these events.

The onweaponhit might be troublesome to make, because technically, the sword fires a raycast.
And that's the same as onprojectilehit.

onvehicletouch was made, but it was quite buggy.
I'm kinda surprised you suggested that.

onvehicletouch has been made, and also suggested quite a few times.

onweaponhit is onprojectilehit

Why can't melee weapons kill bricks?

Wait- someone made a gray crowbar that could destroy small bricks. I think its just a projectile brickdamage issue.

My bad.

please note the sword does have a projectile.


Code: [Select]
datablock ProjectileData(swordProjectile)
{
   directDamage        = 35;
   directDamageType  = $DamageType::Sword;
   radiusDamageType  = $DamageType::Sword;
   explosion           = swordExplosion;
   //particleEmitter     = as;

   muzzleVelocity      = 50;
   velInheritFactor    = 1;

   armingDelay         = 0;
   lifetime            = 100;
   fadeDelay           = 70;
   bounceElasticity    = 0;
   bounceFriction      = 0;
   isBallistic         = false;
   gravityMod = 0.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";

   uiName = "Sword Slice";
};

i'm pretty sure onProjectileHit works with sword, last I tried

but i dont know

i'm pretty sure onProjectileHit works with sword, last I tried.

It does.


every weapon uses projectiles no matter what
Wrong.

Some weapons use 'raycasts' to make instant hit weapons. However, they forgot to make it work with events.

Wrong.

Some weapons use 'raycasts' to make instant hit weapons. However, they forgot to make it work with events.
Really? Fail.
However, I would also like to point out that a select few things, such as the Plunger, have no projectile. Not that plungers are supposed to be weapons, but still...
One idiot put up a zombie server with an RPG Pickaxe as standard melee wep. It did no damage.