yunusowic
New Member
- Reaction score
- 7
I made this charge skill and it works fine. But when i cast, the hero goes to this certain point in the map. It will not charge to the target but it charges to this point. And stops when it reaches that point. Here is the trigger.
Trigger:
- Enrage Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Enrage
- Actions
- Sound - Play BerserkerCaster <gen> at 100.00% volume, attached to (Triggering unit)
- Unit - Create 1 Dummy of the Map for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Enrage Stun to (Last created unit)
- Unit - Set level of Enrage Stun for (Last created unit) to (Level of Enrage for (Triggering unit))
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
- Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
- Unit - Turn collision for (Triggering unit) Off
- Unit - Pause (Triggering unit)
- Set Real[4] = (100.00 x (Real((Level of Enrage for (Triggering unit)))))
- Set Target[(Custom value of (Triggering unit))] = (Target unit of ability being cast)
- Set Unit[(Custom value of (Triggering unit))] = (Triggering unit)
- Custom script: call SetUnitAnimationByIndex( udg_Unit[GetUnitUserData(GetTriggerUnit())], 5)
- Trigger - Turn on Enrage Damage <gen>
- Events
Trigger:
- Enrage Damage
- Events
- Time - Every 0.02 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to Etiket, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Unit[(Integer A)] Not equal to No unit
- Then - Actions
- Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_TPoint[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_Move[GetForLoopIndexA()])
- Set TPoint[(Integer A)] = (Position of Target[(Integer A)])
- Set Point[(Integer A)] = (Position of Unit[(Integer A)])
- Set EnrageAngle[(Integer A)] = (Angle from Point[(Integer A)] to TPoint[(Integer A)])
- Set Move[(Integer A)] = (Point[(Integer A)] offset by 12.00 towards EnrageAngle[(Integer A)] degrees)
- Destructible - Pick every destructible within 140.00 of (Position of Unit[(Integer A)]) and do (Destructible - Kill (Picked destructible))
- Custom script: call SetUnitX(udg_Unit[GetForLoopIndexA()], GetLocationX(udg_Move[GetForLoopIndexA()]))
- Custom script: call SetUnitY(udg_Unit[GetForLoopIndexA()], GetLocationY(udg_Move[GetForLoopIndexA()]))
- Unit - Make Unit[(Integer A)] face EnrageAngle[(Integer A)] over 0.00 seconds
- Unit Group - Pick every unit in (Random 1 units from (Units within 140.00 of Point[(Integer A)] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is in Damaged) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of Unit[(Integer A)])) Equal to Tru and do (Actions)
- Loop - Actions
- Unit Group - Add (Picked unit) to Damaged
- Unit - Cause Unit[(Integer A)] to damage (Picked unit), dealing Real[4] damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
- Special Effect - Destroy (Last created special effect)
- Loop - Actions
- Destructible - Pick every destructible within 140.00 of (Position of Unit[(Integer A)]) and do (Destructible - Kill (Picked destructible))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between Point[(Integer A)] and TPoint[(Integer A)]) Less than or equal to 150.00
- Then - Actions
- Trigger - Turn off (This trigger)
- Custom script: call RemoveLocation (udg_Move[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_TPoint[GetForLoopIndexA()])
- Animation - Reset Unit[(Integer A)]'s animation
- Unit - Remove Enrage buff from Unit[(Integer A)]
- Unit - Unpause Unit[(Integer A)]
- Unit - Turn collision for Unit[(Integer A)] On
- Set Unit[(Integer A)] = No unit
- Set Target[(Integer A)] = No unit
- Unit Group - Remove all units from Damaged
- Else - Actions
- If - Conditions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to Etiket, do (Actions)
- Events