- Joined
- Oct 21, 2006
- Messages
- 3,224
I want shockwave based on stats and spell damage, so I'd like to know how to pick every unit once in a line.
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.
I want shockwave based on stats and spell damage, so I'd like to know how to pick every unit once in a line.
prefix in the thread title, you want it in GUI. That's why I didn't suggest using the local handle vars system.
Shockwave

Events


Unit - A unit Begins casting an ability

Conditions


(Ability being cast) Equal to Shockwave

Actions


Trigger - Add to Shockwave Copy <gen> the event (Unit - A unit comes within 150.00 of Temp_Unit[1])


Unit - Create 1 Footman for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees


Set Temp_Unit[1] = (Last created unit)


For each (Integer A) from 1 to 100, do (Actions)



Loop - Actions




Set Temp_Point[1] = (Position of Temp_Unit[1])




Unit - Move Temp_Unit[1] instantly to (Temp_Point[1] offset by 5.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
Shockwave Damage

Events

Conditions

Actions


Unit - Cause Temp_Unit[1] to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Magic
Shockwave
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Shockwave
Actions
Trigger - Add to Shockwave Copy <gen> the event (Unit - A unit comes within 150.00 of Temp_Unit[1])
Unit - Create 1 Footman for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
Set Temp_Unit[1] = (Last created unit)
For each (Integer A) from 1 to 100, do (Actions)
Loop - Actions
Set Temp_Point[1] = (Position of Temp_Unit[1])
Unit - Move Temp_Unit[1] instantly to (Temp_Point[1] offset by 5.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
This shud work. Just remove any leaks. Also use arithmatic to change the damage so that the casting units strength and whatever gives more damage. You will have to set casting unit to a variable.
Shockwave Damage
Events
Conditions
Actions
Unit - Cause Temp_Unit[1] to damage (Triggering unit), dealing 500.00 damage of attack type Spells and damage type Magic
native RegionAddCell takes region whichRegion, real x, real y returns nothing
native RegionAddRect takes region whichRegion, rect r returns nothing
Dynasti i think that i am right... Ur right that it doesnt move thats cuz i forgot to add wait .03 seconds at the end of the loop![]()
