Devrak
New Member
- Reaction score
- 17
I want to destroy all destructibles in a line between two points. How would I be able to do this? :nuts:
set distance_integer = real(distance between point1 and point2) / 100
set angle = angle from point1 to point2
for each (Integer A) from 1 to distance_integer
loop
set point_offset = point1 offset by 100.00 towards angle degrees
pick every destructible within 50.00 of point_offset and do actions
kill picked destructible
call RemoveLocation(udg_point_offset)
Trigger 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Animate Dead
Actions
Set Point_TargetedPoint = (Target point of ability being cast)
Unit - Create 1 Footman for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
Set Dummy = (Last created unit)
Set Point_Dummy = (Position of Dummy)
Unit - Add a 10.00 second Generic expiration timer to Dummy
Unit - Order Dummy to Right-Click Point_TargetedPoint
Trigger - Turn on Trigger 2 <gen>
Trigger 2
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Destructible - Pick every destructible within 200.00 of Point_Dummy and do (Actions)
Loop - Actions
Destructible - Remove (Picked destructible)
Wait until (((Issued order) Equal to (Order(Right-Click))) and ((Target unit of issued order) Equal to Dummy)), checking every 0.10 seconds
Unit - Remove Dummy from the game
Trigger - Turn off (This trigger)