I've got a problem with a hero I made. I created a new weapon for him, but it isn't working right. He does damage correctly, but he doesn't always hit unless the enemies are close to him. If he tries to attack enemies that are a bit farther away (such as pikemen), he goes through the animations and stuff, but for some reason doesn't deal any damage. It's like he's missing somehow, or else attacking beyond his weapon's range. Here's the code...
Weapon GilgaladSpear RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR LeechRangeWeapon = Yes AttackRange = 30.0 CanFireWhileMoving = No MeleeWeapon = Yes DelayBetweenShots = GILGALAD_DELAYBETWEENSHOTS PreAttackDelay = GILGALAD_PREATTACKDELAY PreAttackType = PER_SHOT FireFX = FX_GandalfSwordHit RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR FiringDuration = GILGALAD_FIRINGDURATION DamageDealtAtSelfPosition = Yes DamageNugget Damage = 300 Radius = 30.0 DelayTime = 0 DamageType = HERO DamageFXType = SWORD_SLASH DeathType = NORMAL End DamageNugget Damage = 200 Radius = 30.0 DelayTime = 0 DamageType = MAGIC DamageFXType = MAGIC DamageScalar = 600% NONE +MordorSauron DeathType = NORMAL End MetaImpactNugget ; HeroResist = .75 ShockWaveAmount = 20 ShockWaveRadius = 30 ShockWaveArc = 50 ShockWaveTaperOff = 1.0 ShockWaveSpeed = 0.0 ShockWaveZMult = 1.6 End End
I've tried reducing the attack range to 20, but that didn't seem to help. Any ideas?
Edited by Ereinion2, 23 December 2006 - 12:07 AM.