- Joined
- Apr 9, 2004
- Messages
- 502
Ok, so here's the layout. I'm creating an "activate-able" ability that drains mana, but converts your hero;s attack into line based damage that will be able to hit multiple units.
I've used a dummy bear form to change my archer with exactly the same unit, except with an instant attack instead of a ranged one. I'm triggering all the missiles that fly out in a line to deal the actual damage. Anyways, it wall works out fine until I try attacking dwarven marksmen or human priests, the only ranged spawns i use on my map. It works fine on any melee that i've seen, namely footmen and the paladin computer controlled hero. For these units, it fires out the dummy arrow properly and re-heals the unit i had initially attacked so that it doesn't seem like I've hit them yet. However, for the ranged units, it won't create the dummy unit, EVEN THOUGH it re-heals them.
it's all one function so i don't get where it goes wrong. And if I move the healing part to another portion of the function, it won't fire either. still, I have no idea what's causing my trigger to skip over doing the proper actions when faced with these units.
I've used a dummy bear form to change my archer with exactly the same unit, except with an instant attack instead of a ranged one. I'm triggering all the missiles that fly out in a line to deal the actual damage. Anyways, it wall works out fine until I try attacking dwarven marksmen or human priests, the only ranged spawns i use on my map. It works fine on any melee that i've seen, namely footmen and the paladin computer controlled hero. For these units, it fires out the dummy arrow properly and re-heals the unit i had initially attacked so that it doesn't seem like I've hit them yet. However, for the ranged units, it won't create the dummy unit, EVEN THOUGH it re-heals them.
it's all one function so i don't get where it goes wrong. And if I move the healing part to another portion of the function, it won't fire either. still, I have no idea what's causing my trigger to skip over doing the proper actions when faced with these units.
-
Compensate Shot Damage Bonus
- Events
-
Conditions
- (Damage source) Equal to BoneClinkz
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of BoneClinkz) Equal to Skeletal Archer (Piercing Arrow Form)
-
Then - Actions
- Set BC_PS_DamageDealt = ((Damage taken) + 0.00)
- Set BC_PS_DelayedHealedUnit = CompShotTarget
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Life of BC_PS_DelayedHealedUnit) + (Damage taken)) Greater than or equal to (Max life of BC_PS_DelayedHealedUnit)
-
Then - Actions
- Countdown Timer - Start BC_PS_heal_delay_timer as a One-shot timer that will expire in 0.00 seconds
-
Else - Actions
- Unit - Set life of BC_PS_DelayedHealedUnit to ((Life of BC_PS_DelayedHealedUnit) + (Damage taken))
-
If - Conditions
- Set BC_PS_InitialLife = (Life of BC_PS_DelayedHealedUnit)
- Unit - Cause PlayerDamager[(Player number of (Owner of BoneClinkz))] to damage BC_PS_DelayedHealedUnit, dealing 25.00 damage of attack type Chaos and damage type Normal
- Set BC_PS_ArmorReduction = (1.00 - ((BC_PS_InitialLife - (Life of BC_PS_DelayedHealedUnit)) / 25.00))
- Unit - Set life of BC_PS_DelayedHealedUnit to ((Life of BC_PS_DelayedHealedUnit) + (25.00 x (1.00 - BC_PS_ArmorReduction)))
- Set BC_PS_ActualDamage = (BC_PS_DamageDealt / BC_PS_ArmorReduction)
- Set BC_PS_FirePoint = (Position of BoneClinkz)
- Set BC_PS_TargetPoint = (Position of BC_PS_DelayedHealedUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BC_PS_CurrentArrowInteger Less than 11
-
Then - Actions
- Set BC_PS_CurrentArrowInteger = (BC_PS_CurrentArrowInteger + 1)
-
Else - Actions
- Set BC_PS_CurrentArrowInteger = 1
-
If - Conditions
- Set BC_PS_Angle[BC_PS_CurrentArrowInteger] = (Angle from BC_PS_FirePoint to BC_PS_TargetPoint)
- Set BC_PS_ArrowMovePoint[BC_PS_CurrentArrowInteger] = (BC_PS_FirePoint offset by 25.00 towards BC_PS_Angle[BC_PS_CurrentArrowInteger] degrees)
- Set BC_PS_ArrowMovementInterval[BC_PS_CurrentArrowInteger] = 0
- Unit - Create 1 Universal Arrow Unit for (Owner of BoneClinkz) at BC_PS_ArrowMovePoint[BC_PS_CurrentArrowInteger] facing BC_PS_Angle[BC_PS_CurrentArrowInteger] degrees
- Set BC_PS_Arrow[BC_PS_CurrentArrowInteger] = (Last created unit)
- Unit - Add Flying Trick to BC_PS_Arrow[BC_PS_CurrentArrowInteger]
- Unit - Add Peircing Arrows Missile effect to BC_PS_Arrow[BC_PS_CurrentArrowInteger]
- Unit - Remove Flying Trick from BC_PS_Arrow[BC_PS_CurrentArrowInteger]
- Animation - Change BC_PS_Arrow[BC_PS_CurrentArrowInteger] flying height to 60.00 at 1000000000.00
- Animation - Change BC_PS_Arrow[BC_PS_CurrentArrowInteger]'s animation speed to 500.00% of its original speed
- Custom script: call SetUnitAnimationByIndex(udg_BC_PS_Arrow[udg_BC_PS_CurrentArrowInteger],90)
- Unit - Turn collision for BC_PS_Arrow[BC_PS_CurrentArrowInteger] Off
- Unit - Move BC_PS_Arrow[BC_PS_CurrentArrowInteger] instantly to BC_PS_ArrowMovePoint[BC_PS_CurrentArrowInteger], facing BC_PS_Angle[BC_PS_CurrentArrowInteger] degrees
- Unit - Set the custom value of BC_PS_Arrow[BC_PS_CurrentArrowInteger] to BC_PS_CurrentArrowInteger
- Set BC_PS_Arrow_Damage[BC_PS_CurrentArrowInteger] = BC_PS_ActualDamage
- Unit Group - Add BC_PS_Arrow[BC_PS_CurrentArrowInteger] to BC_PS_ArrowsInMotion
- Custom script: call RemoveLocation(udg_BC_PS_TargetPoint)
- Custom script: call RemoveLocation(udg_BC_PS_FirePoint)
- Custom script: call RemoveLocation(udg_BC_PS_ArrowMovePoint[udg_BC_PS_CurrentArrowInteger])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (MoveArrows and deal damage <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on MoveArrows and deal damage <gen>
- Countdown Timer - Start BC_PS_ArrowMotionTimer as a One-shot timer that will expire in 0.00 seconds
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Trigger - Turn off (This trigger)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Last edited: