Hi, i have a problem with this function. What i want to do is to create a system that reduce the damaged inflicted to a pc by the armor material.
I've had made a basic system based on the tag and activated by the onEquip event but i don't know how to make this effect to work, this is a snippet of my code:
if(iArmorResTagl > 0){
effect eArmorTagl = EffectDamageResistance(DAMAGE_TYPE_SLASHING, iArmorResTagl);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorTagl, oPc);
}
if(iArmorResCont > 0){
effect eArmorCont = EffectDamageResistance(DAMAGE_TYPE_BLUDGEONING, iArmorResCont);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorCont, oPc);
}
if(iArmorResPerf > 0){
effect eArmorPerf = EffectDamageResistance(DAMAGE_TYPE_PIERCING, iArmorResPerf);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eArmorPerf, oPc);
}
The EffectDamageResistance seems not to work because, just trying to combine the effect (though they are 3 different type of damage).
Any hint?
inb4: sorry for bad english
'>