AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   gMultiDamage (https://forums.alliedmods.net/showthread.php?t=164253)

jlkj81352 08-09-2011 06:54

gMultiDamage
 
Is there anyway to trigger gMultiDamage Functions?

fysiks 08-09-2011 08:47

Re: gMultiDamage
 
What is "gMultiDamage Functions"?

Arkshine 08-09-2011 09:03

Re: gMultiDamage
 
That :

PHP Code:

/*
==============================================================================

MULTI-DAMAGE

Collects multiple small damages into a single damage

==============================================================================
*/

//
// ClearMultiDamage - resets the global multi damage accumulator
//
void ClearMultiDamage(void)
{
    
gMultiDamage.pEntity NULL;
    
gMultiDamage.amount    0;
    
gMultiDamage.type 0;
}


//
// ApplyMultiDamage - inflicts contents of global multi damage register on gMultiDamage.pEntity
//
// GLOBALS USED:
//        gMultiDamage

void ApplyMultiDamage(entvars_t *pevInflictorentvars_t *pevAttacker )
{
    
Vector        vecSpot1;//where blood comes from
    
Vector        vecDir;//direction blood should go
    
TraceResult    tr;
    
    if ( !
gMultiDamage.pEntity )
        return;

    
gMultiDamage.pEntity->TakeDamage(pevInflictorpevAttackergMultiDamage.amountgMultiDamage.type );
}


// GLOBALS USED:
//        gMultiDamage

void AddMultiDamageentvars_t *pevInflictorCBaseEntity *pEntityfloat flDamageint bitsDamageType)
{
    if ( !
pEntity )
        return;
    
    
gMultiDamage.type |= bitsDamageType;

    if ( 
pEntity != gMultiDamage.pEntity )
    {
        
ApplyMultiDamage(pevInflictor,pevInflictor); // UNDONE: wrong attacker!
        
gMultiDamage.pEntity    pEntity;
        
gMultiDamage.amount        0;
    }

    
gMultiDamage.amount += flDamage;




At the end of TraceAttack, for example you have : AddMultiDamage( pevAttacker, this, flDamage, bitsDamageType );

To answer to the question, with Orpheu, you can yes.

jlkj81352 08-09-2011 09:16

Re: gMultiDamage
 
In all half-life based mod?

Arkshine 08-09-2011 09:30

Re: gMultiDamage
 
How I could know ? Check yourself in each binary. ^^

jlkj81352 08-09-2011 09:56

Re: gMultiDamage
 
thx, i will try it


All times are GMT -4. The time now is 03:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.