View Single Post
Author Message
WAR3DM
Senior Member
Join Date: Mar 2016
Old 03-08-2018 , 15:20   Ham_TraceAttack for Grenades?
Reply With Quote #1

Hello

Is it possible to trace grenade attacks on a brush entity? Ham_TraceAttack seems to only work for bullets.

Code:
/**
     * Description:     Usually called whenever an entity gets attacked by a hitscan (such as a gun) weapon.
     *                  Use the get/set tr2 natives in fakemeta to handle the traceresult data.
     *                  Do not use a handle of 0 as a traceresult in execution, use create_tr2() from Fakemeta
     *                  to pass a custom handle instead.  (Don't forget to free the handle when you're done.)
     * Forward params:  function(this, idattacker, Float:damage, Float:direction[3], traceresult, damagebits)
     * Return type:     None.
     * Execute params:  ExecuteHam(Ham_TraceAttack, this, idattacker, Float:damage, Float:direction[3], tracehandle, damagebits);
     */
    Ham_TraceAttack
I tried Ham_TakeDamage but that doesn't seem to work on brush entities.

Perhaps there's a way to detect grenade blasts within a radius around the brush entity?

Any help is greatly appreciated!

Last edited by WAR3DM; 03-10-2018 at 21:38.
WAR3DM is offline