- Joined
- Jul 10, 2014
- Messages
- 3
Hello, I've been going to hive workshop for years and I've finally made an account.
Anyways, I've recently started map making and I've been teaching my self GUI while making a map. However, I've come across a problem I can't figure out. Checking online, I found nothing after searching forever for something similar.
===================================================
In my map certain hostile units have a spell which fires an arrow 1500 distance from the angle and position of the unit towards a point.
I would like Ancient units (Unit classification for units with the spell) to begin casting at the point of a unit that's not equal to neutral hostile once they come within range. I tried using the event "Comes within distance" but it only allows preset units.
I tried to make this happen several ways, and this is the only way I've managed to scrap together. I don't like it, the neutral hostile unit has to fire one ranged auto attack at you before he starts casting the dummy arrows at your hero's position.
Would anyone mind helping me fix this?
Anyways, I've recently started map making and I've been teaching my self GUI while making a map. However, I've come across a problem I can't figure out. Checking online, I found nothing after searching forever for something similar.
===================================================
In my map certain hostile units have a spell which fires an arrow 1500 distance from the angle and position of the unit towards a point.
I would like Ancient units (Unit classification for units with the spell) to begin casting at the point of a unit that's not equal to neutral hostile once they come within range. I tried using the event "Comes within distance" but it only allows preset units.
I tried to make this happen several ways, and this is the only way I've managed to scrap together. I don't like it, the neutral hostile unit has to fire one ranged auto attack at you before he starts casting the dummy arrows at your hero's position.
Would anyone mind helping me fix this?
-
Arrow Aggro
-
Events
- Unit - A unit Is attacked
-
Conditions
- ((Attacking unit) is An Ancient) Equal to True
- (Owner of (Attacking unit)) Equal to Neutral Hostile
-
Actions
- Set UnitBowAttack = (Attacked unit)
- Trigger - Turn on Arrow Aggro Copy <gen>
-
Events
-
Arrow Aggro Copy
-
Events
- Time - Every 2.55 seconds of game time
- Conditions
-
Actions
- Set MoveGroup = (Units within 4000.00 of (Position of UnitBowAttack) matching ((((Matching unit) is An Ancient) Equal to True) and ((Owner of (Matching unit)) Equal to Neutral Hostile)))
-
Unit Group - Pick every unit in MoveGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (All units of MoveGroup are dead) Equal to False
- (UnitBowAttack is alive) Equal to True
-
Then - Actions
- Set PointBowAttack = (Position of UnitBowAttack)
- Unit - Order (Picked unit) to Neutral Tinker - Cluster Rockets (PointBowAttack offset by (0.00, 0.00))
- Custom script: call RemoveLocation(udg_PointBowAttack)
-
Else - Actions
- Trigger - Turn off (This trigger)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events