- Joined
- Aug 18, 2009
- Messages
- 21
Dash With Damage MUI
Greetings... Could you please help me with this code. It's supposed to be a dash skill that deals damage once when you hit a unit. I'm trying to use the GUI Unit Indexer by Bribe but I can't get it to work. It deals continuous damage to a unit even though it's hit. I hope you guys could help me.
These are the triggers I made:
Greetings... Could you please help me with this code. It's supposed to be a dash skill that deals damage once when you hit a unit. I'm trying to use the GUI Unit Indexer by Bribe but I can't get it to work. It deals continuous damage to a unit even though it's hit. I hope you guys could help me.
These are the triggers I made:
-
Dash
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Light Strike
-
Actions
- Set DashKey = (Custom value of (Triggering unit))
- Set DashCaster[DashKey] = (Triggering unit)
- Set Location[1] = (Position of (Triggering unit))
- Set DashAngle[DashKey] = (Facing of (Triggering unit))
- Set DashHitGroup[DashKey] = DashHitGroup[DashKey]
- Set DashDist[DashKey] = 0.00
- Unit Group - Remove all units from DashHitGroup[DashKey]
- Custom script: call RemoveLocation(udg_Location[1])
- Unit Group - Add (Triggering unit) to DashHit
- Unit - Pause (Triggering unit)
-
Events
-
Dasg Mov
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in DashHit and do (Actions)
-
Loop - Actions
- Set DashKey = (Custom value of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer(DashDist[DashKey])) Less than 350
-
Then - Actions
- Set Location[1] = ((Position of DashCaster[DashKey]) offset by 30.00 towards DashAngle[DashKey] degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at Location[1] of type Walkability is off) Equal to True
- ((Unit-type of DashCaster[DashKey]) is Snared) Equal to True
- Then - Actions
-
Else - Actions
- Unit - Move DashCaster[DashKey] instantly to Location[1]
-
If - Conditions
- Special Effect - Create a special effect at Location[1] using adad
- Special Effect - Destroy (Last created special effect)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 150.00 of Location[1] matching (((Matching unit) belongs to an enemy of (Owner of DashCaster[DashKey])) Equal to True)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of DashCaster[DashKey])) Equal to True
- ((Picked unit) is Mechanical) Equal to False
- ((Picked unit) is in DashHitGroup[DashKey]) Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to DashHitGroup[DashKey]
- Set DamageEventType = DamageTypePhysical
- Unit - Cause DashCaster[DashKey] to damage (Picked unit), dealing (0.00 + (1.00 x (Real((Agility of DashCaster[DashKey] (Include bonuses)))))) damage of attack type Hero and damage type Normal
- Custom script: call RemoveLocation(udg_Location[1])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_Location[1])
- Set DashDist[DashKey] = (DashDist[DashKey] + 30.00)
-
Else - Actions
- Unit - Unpause DashCaster[DashKey]
- Unit Group - Remove (Picked unit) from DashHit
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in DashHit and do (Actions)
-
Events
Last edited: