- Joined
- Mar 2, 2013
- Messages
- 127
I've been working on this for a while and can't seem to get it to work.
Here is out its supposed to be,
Unit uses item, dashes at the point. Then after its done unit stops, the units pushes everyone away from him dealing 100 damage aoe.
The problem is the the triggering unit keeps moving.. Anyone know what might be the problem?
Here is out its supposed to be,
Unit uses item, dashes at the point. Then after its done unit stops, the units pushes everyone away from him dealing 100 damage aoe.
The problem is the the triggering unit keeps moving.. Anyone know what might be the problem?
-
Dash
-
Events
- Unit - A unit Uses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to (==) Spirit Bells
-
Actions
- Set DashCaster = (Triggering unit)
- Set DashCasterPoint = (Position of DashCaster)
- Set DashTarget = (Target point of ability being cast)
- Set DashAngle = (Angle from DashCasterPoint to DashTarget)
- Unit - Make DashCaster Invulnerable
- Trigger - Turn on Dash Movement <gen>
- Custom script: call RemoveLocation(udg_DashCasterPoint)
-
Events
-
Dash Movement
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Set DashCasterPoint = (Position of DashCaster)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between DashCasterPoint and DashTarget) Less than or equal to (<=) 40.00
-
Then - Actions
- Unit - Turn collision for DashCaster On
- Unit - Make DashCaster Vulnerable
- Trigger - Turn off (This trigger)
-
Else - Actions
- Set DashLength = (DashCasterPoint offset by 30.00 towards DashAngle degrees)
- Unit - Turn collision for DashCaster Off
- Unit - Move DashCaster instantly to DashLength
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Set DashCasterPoint = (Position of DashCaster)
-
Events
-
Pushy
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to (==) Dash Push
-
Actions
- Set TempPointA = (Position of (Triggering unit))
- Set TempGroup = (Units within 200.00 of TempPointA)
- -------- Conditions are for deciding whether a unit should be possible to knock. I guess buildings should not. --------
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A structure) Equal to (==) False
- ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True
-
Then - Actions
- Set TempPointB = (Position of (Picked unit))
- Set KnockAngle[(Custom value of (Picked unit))] = (Angle from TempPointA to TempPointB)
- Set KnockSpeed[(Custom value of (Picked unit))] = 50.00
- Unit Group - Add (Picked unit) to KnockedGroup
-
Unit Group - Pick every unit in KnockedGroup and do (Actions)
-
Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Hero and damage type Normal
- Special Effect - Create a special effect attached to the chest of DashCaster using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Trigger - Turn on KnockbackLoop <gen>
- Custom script: call RemoveLocation(udg_TempPointB)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempPointA)
- Custom script: call DestroyGroup(udg_TempGroup)
-
Events
-
PushyB
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in KnockedGroup) Greater than (>) 0
-
Then - Actions
-
Unit Group - Pick every unit in KnockedGroup and do (Actions)
-
Loop - Actions
- Set TempPointA = (Position of (Picked unit))
-
Set TempPointB = (TempPointA offset by KnockSpeed[(Custom value of (Picked unit))] towards KnockAngle[(Custom value of (Picked unit))] degrees)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at TempPointB of type Walkability is off) Equal to (==) False
- KnockSpeed[(Custom value of (Picked unit))] Greater than (>) 0.00
-
Then - Actions
- -------- Using custom script to not interrupt orders --------
- Custom script: call SetUnitX(GetEnumUnit(),GetLocationX(udg_TempPointB))
- Custom script: call SetUnitY(GetEnumUnit(),GetLocationY(udg_TempPointB))
- Set KnockSpeed[(Custom value of (Picked unit))] = ((KnockSpeed[(Custom value of (Picked unit))] x 0.90) - 0.50)
-
Else - Actions
- Unit Group - Remove (Picked unit) from KnockedGroup
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Custom script: call RemoveLocation(udg_TempPointA)
- Custom script: call RemoveLocation(udg_TempPointB)
- Custom script: call RemoveLocation(udg_DashCasterPoint)
-
Loop - Actions
-
Unit Group - Pick every unit in KnockedGroup and do (Actions)
-
Else - Actions
- Trigger - Turn off (This trigger)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events