Hi guys,
Working on a skill that when you fire weapon, damage is modified by 1.5, but then any other shots for the next 10 seconds, are normal damage. Then cycle repeats.
Here's what i've been using, which works perfectly for everything except the shotgun. I'm assuming it's not working due to the shotgun firing 8 slugs, and the way that it calculates the total damage?
What's the best way that i can modify the damage of a single 'fire event' for the shotgun?
Cheers
Working on a skill that when you fire weapon, damage is modified by 1.5, but then any other shots for the next 10 seconds, are normal damage. Then cycle repeats.
Here's what i've been using, which works perfectly for everything except the shotgun. I'm assuming it's not working due to the shotgun firing 8 slugs, and the way that it calculates the total damage?
Code: [Select]
public OnW3TakeDmgAllPre(victim,attacker,Float:damage)
{
if(ValidPlayer(victim, true) && ValidPlayer(attacker) && attacker!=victim)
{
if(GetClientTeam(victim)!=GetClientTeam(attacker))
{
if(War3_GetRace(attacker)==thisRaceID)
{
new SkillLevel = War3_GetSkillLevel(attacker,thisRaceID,SKILL_DAMAGE);
if(SkillLevel>0)
{
if(War3_SkillNotInCooldown(attacker,thisRaceID,SKILL_DAMAGE,true))
{
War3_DamageModPercent(1.5);
War3_CooldownMGR(attacker,10.0,thisRaceID,SKILL_DAMAGE, _, _);
}
}
}
}
}
}What's the best way that i can modify the damage of a single 'fire event' for the shotgun?
Cheers


Logged