Hey guys i have a spell problem i hope you can help me with
i am trying to make a charge spell that makes my hero rush to the target
Theese are the triggers that i've made for it but it doesnt work for some reason. my hero just pause the target which is pretty OP xD
i am trying to make a charge spell that makes my hero rush to the target
Trigger:
- ChargeSpell
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Charge
- Actions
- Set ChargeCaster = (Triggering unit)
- Set ChargeTarget = (Target unit of ability being cast)
- Set ChargeDamage = (50.00 + ((Real((Level of Charge for (Triggering unit)))) x 50.00))
- Unit - Set ChargeCaster movement speed to 600.00
- Selection - Remove ChargeTarget from selection
- Unit - Order ChargeCaster to Attack ChargeTarget
- Unit - Pause ChargeTarget
- Events
Trigger:
- ChargeSpellCheck
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- Set ChargeCasterPoint = (Position of ChargeCaster)
- Set ChargeTargetPoint = (Position of ChargeTarget)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between ChargeCasterPoint and ChargeTargetPoint) Less than or equal to 200.00
- Then - Actions
- Unit - Unpause ChargeTarget
- Unit - Cause ChargeCaster to damage ChargeTarget, dealing ChargeDamage damage of attack type Spells and damage type Normal
- Unit - Set ChargeCaster movement speed to (Default movement speed of ChargeCaster)
- Selection - Select ChargeCaster for (Owner of ChargeCaster)
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_ChargeCasterPoint)
- Custom script: call RemoveLocation(udg_ChargeTargetPoint)
- Events
Theese are the triggers that i've made for it but it doesnt work for some reason. my hero just pause the target which is pretty OP xD