• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

[Help] How to add Vet_type to damage?

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
so i'm trying to make fieldmedics get equal damage on FF, but their armour keeps absorbing it all:

Code:
class ffRules extends GameRules;

function int NetDamage( int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
{
    if ( injured.isa('kfhumanpawn') && instigatedby.isa('kfhumanpawn') && injured!=instigatedby)
    {
          instigatedby.takedamage((damage * 2.5), instigatedBy, hitlocation, momentum, damageType);
      damage = damage;
      return Damage;
    }
    //if person is fieldmedic, do 10x moredamage to get through medic armour
    else if ( injured.isa('kfhumanpawn') && instigatedby.isa('kfhumanpawn(KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill == Class'SRVetFieldMedic')') && injured!=instigatedby)
    {
          instigatedby.takedamage((damage * 125), instigatedBy, hitlocation, momentum, damageType);
        damage = damage;
        return Damage;
    }
    
}
and i dont really know how to add the clientvetskill to this correctly.

or is there a way to send the FF damage directly to health? bypass the armour (shieldabsorb)?
 
Last edited:

matttthias

FNG / Fresh Meat
Mar 5, 2010
174
10
0
Austria
www.team-gmk.com
maybe try this:

Code:
instigatedby.health -= damage*Level.Game.FriendlyFireScale;
dont know if it works but i think this would directly lower his health without touching the armour
 

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
\ffrules.uc(7) : Error, Unrecognized member 'FriendlyFireScale' in class 'GameInfo'

also tried (and failed):
Code:
instigatedby.health -= damage*Level.Game.unrealmpgameinfo.deathmatch.teamgame.xteamgame.invasion.kfgametype.FriendlyFireScale;
-edit:
ok i got it with this: (only tested with a kfhumanpawn bot though)
Code:
 if ( injured.isa('kfhumanpawn') && instigatedby.isa('kfhumanpawn') && injured!=instigatedby)
 {
   instigatedby.Health = (instigatedby.Health - Damage);
   injured.Health = (injured.Health - Damage);
   damage = 0;
   return Damage;
 }
totally ignores perk stuff and sends whatever damage recieved to the inflictor also.
 
Last edited:

FZFalzar

FNG / Fresh Meat
May 11, 2011
128
3
0
UCC.exe
how about add this outside your braces? its supposed to be the hack for the Siren damage, which ignores your armor and deals damage direct --EDIT: this is taken from KFPawn which contains the damage methods you might want to take a look at
Code:
if (DamageType.default.DamageOverlayMaterial != None)
SetOverlayMaterial( DamageType.default.DamageOverlayMaterial, DamageType.default.DamageOverlayTime, false );
maybe call TakeDamage() or something after this
 
Last edited:

ro_sauce

FNG / Fresh Meat
Sep 26, 2007
3,135
329
0
bwhgaming.com
here's the progress so far:

Code:
class ffRules extends GameRules;

function int NetDamage( int OriginalDamage, int Damage, pawn injured,  pawn instigatedBy, vector HitLocation, out vector Momentum,  class<DamageType> DamageType )
{
local int ArmorDamage;
local int HPDamage;

if ( injured.isa('kfhumanpawn') && instigatedby.isa('kfhumanpawn') && injured!=instigatedby)
{
armordamage = (Damage * TeamGame(Level.Game).FriendlyFireScale) * 0.7;
hpdamage = (Damage * TeamGame(Level.Game).FriendlyFireScale);

instigatedby.Health -= HPDamage;
injured.Health -= HPDamage;

if ((instigatedby.ShieldStrength - ArmorDamage) <= 0) {
instigatedby.ShieldStrength = 0;
}
else {
instigatedby.ShieldStrength -= ArmorDamage;
}

if (injured.shieldStrength - (Damage * TeamGame(Level.Game).FriendlyFireScale) <= 0.0) {
injured.shieldStrength = 0;
}
else {
injured.ShieldStrength -= ArmorDamage;
}


damage = 0;
return Damage;
}
}

defaultproperties
{
}