- Joined
- Oct 25, 2009
- Messages
- 996
How can i damage a unit 1 time with every 0.03 second and it always near the dummy,won't be damaged again?
Set the Damage type or?
+REP
Set the Damage type or?
+REP
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Set tempp1 = (Position of yourunit1)


Set tempp2 = (Position of yourunit2)


If (All conditions are true) then do (Then actions) else do (Else actions)



If - Conditions




((Distance between tempp1 and tempp2) Less than 500)



Then - Actions




Unit Group - Add yourunit2 to PreventGroup



Else - Actions




Unit Group - remove yourunit2 from PreventGroup


If (All conditions are true) then do (Then actions) else do (Else actions)



If - Conditions




(yourunit2 is in PreventGroup) Equal to False



Then - Actions




Unit - Order Yourunit1 to damage (Picked unit) dealing DAMAGE damage of attack type Magic and damage type Normal



Else - Actions
Unit Group - Pick every unit in TS_Group and do (Actions)

Loop - Actions


Set TS_PickedUnit = (Picked unit)


Set TS_PickedUnitPoint = (Position of TS_PickedUnit)


Set TS_PickedUnitOffPoint = (TS_PickedUnitPoint offset by -30.00 towards (Facing of TS_PickedUnit) degrees)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Picked unit) is alive) Equal to True




(TS_PickedUnit is in TS_Group) Not equal to True



Then - Actions




Unit Group - Add TS_PickedUnit to TS_Group2




Unit - Move TS_PickedUnit instantly to TS_PickedUnitOffPoint, facing TS_Point2




Unit - Cause TS_Dummy[TS_IndexLoop] to damage TS_PickedUnit, dealing 250.00 damage of attack type Spells and damage type Death




Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl




Special Effect - Destroy (Last created special effect)



Else - Actions


Custom script: call RemoveLocation(udg_TS_PickedUnitPoint)


Custom script: call RemoveLocation(udg_TS_PickedUnitOffPoint)
Unit Group - Pick every unit in TS_Group and do (Actions)

Loop - Actions


Set TS_Point4 = (Position of TS_Dummy[TS_IndexLoop])


Set TS_PickedUnit = (Picked unit)


Set TS_PickedUnitPoint = (Position of TS_PickedUnit)


Set TS_PickedUnitOffPoint = (TS_PickedUnitPoint offset by -30.00 towards (Facing of TS_PickedUnit) degrees)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Picked unit) is alive) Equal to True



Then - Actions




Unit - Move TS_PickedUnit instantly to TS_PickedUnitOffPoint, facing TS_Point2




Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl




Special Effect - Destroy (Last created special effect)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Distance between TS_PickedUnitPoint and TS_Point4) Less than or equal to 200.00





Then - Actions






Unit Group - Add TS_PickedUnit to TS_Group2





Else - Actions






Unit Group - Remove TS_PickedUnit from TS_Group2




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(TS_PickedUnit is in TS_Group2) Equal to False





Then - Actions






Unit - Cause TS_Dummy[TS_IndexLoop] to damage TS_PickedUnit, dealing 250.00 damage of attack type Spells and damage type Normal





Else - Actions



Else - Actions


Custom script: call RemoveLocation(udg_TS_PickedUnitPoint)


Custom script: call RemoveLocation(udg_TS_PickedUnitOffPoint)


Custom script: call RemoveLocation(udg_TS_Point4)
