Need Help [GUI] damage + dash

Cyberend

New Member
Reaction score
1
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:

THE PROBLEM LIES IN THE DAMAGE PART. IT DEALS DAMAGE EVEN WHEN THE UNIT IS ADDED TO A GROUP.
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 TestGroup
Custom script: call RemoveLocation(udg_Location[1])
Unit Group - Add (Triggering unit) to DashHit
Unit - Pause (Triggering unit)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
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]
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 TestGroup) Equal to False
Then - Actions
Unit Group - Add (Picked unit) to TestGroup
Set DamageEventType = DamageTypePhysical
Unit - Cause BulletUnit[1] 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
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
 

Mythes

Member
Reaction score
7
Repost this trigger-script with the [~wc3] tags please.

just right click your trigger text and click "copy to text"
Then put in the post
[.wc3]
*ctrl+v*
[./wc3]


(obviously without the dots)

It'll be easier to read... The way you posted is too confusing to read...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top