Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
I want to make something like DoTa units that spawn go attack other base but still attacks all the other units in the way... my prob is thatr when they attack some stay behind spell_breakerls help
You can order units to "Attack/move" to a target point and use several rects (used as waypoints) in a line to make the units go from one rect to another. That is a quite basic issue, you should find that on AOS/TD tutorials.
Some units may stand still if they cast spells or are stopped through other things. To fix that problem, you need to pick all units that have no command and order them to run to the point they are supposed to run. If you cannot realize this, you can still make them run to the enemy base.
This is an example out of my map. My custom function UnitGoOnPushing(unit) is a wrapperfunction that simply orders the units to go to their next specified waypoint. You should replace that with a simple "issue order picked unit to attack/move to center of (target area)" in order to make this work.
Code:
[b]Set Tempgroup = (Units in (Playable map area) matching ((String((Current order of (Matching unit)))) = <Empty String>)))
Unitgroup - Pick every unit in Tempgroup and do (Actions)
Actions[/b]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'
(Player number of (Owner of (Picked unit))) <= 2
'THEN'
[b]Custom script: call UnitGoOnPushing(GetEnumUnit())[/b]
'ELSE'
Custom script: [b]call DestroyGroup(udg_Tempgroup)[/b]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.