Hey, im working on a simple survival map to get better with the editor. I have hit a roadblock with ai. I made zerglings spawn automatically, But they wont attack anything. I tried making it so every second all of the idle units will suicide, and so every 5 seconds all of the enemies would mass suicide. I got all happy when it seemed to work.... But then they stopped attacking.
You need to issue an order targeting a point. That gets them to attack.
The one caveat is that by default you only order a single unit to attack. The easiest way to do this is do a For-Each statement. Let's say you want 40 Zerglings to spawn and attack the Player Starting Point.
For each [Insert Your Variable Here] from 1 - 40 Increment 1
Create 1 Zergling at some point
Issue Order to Last Created Unit to Attack Targeting Player 1 Starting Location
This will create 40 Zerglings all at once and attack. Additionally, if you want more of a stream of units instead of a large group, you can add "Wait 1.0 Game Time seconds" or any other value of your choice and they will spawn one at a time and attack. Play with the wait time to get a tight line or a widely spread line.
You need to issue an order targeting a point. That gets them to attack.
The one caveat is that by default you only order a single unit to attack. The easiest way to do this is do a For-Each statement. Let's say you want 40 Zerglings to spawn and attack the Player Starting Point.
For each [Insert Your Variable Here] from 1 - 40 Increment 1 Create 1 Zergling at some point Issue Order to Last Created Unit to Attack Targeting Player 1 Starting Location
This will create 40 Zerglings all at once and attack. Additionally, if you want more of a stream of units instead of a large group, you can add "Wait 1.0 Game Time seconds" or any other value of your choice and they will spawn one at a time and attack. Play with the wait time to get a tight line or a widely spread line.
Hey guys. having a bit of trouble with this as well..
I'm spawning 5 zerglings.. and I want to order them to attack at a certain point.
i've tried looking through the element lists for "for each integer, player in player group, real, and unit in unit group"
I've not seen the increment selection.. and I can only seem to order special abilities for specific unit types.. no basic "move, attack, patrol" etc..
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey, im working on a simple survival map to get better with the editor. I have hit a roadblock with ai. I made zerglings spawn automatically, But they wont attack anything. I tried making it so every second all of the idle units will suicide, and so every 5 seconds all of the enemies would mass suicide. I got all happy when it seemed to work.... But then they stopped attacking.
@Noofertonson: Go
You need to issue an order targeting a point. That gets them to attack.
The one caveat is that by default you only order a single unit to attack. The easiest way to do this is do a For-Each statement. Let's say you want 40 Zerglings to spawn and attack the Player Starting Point.
For each [Insert Your Variable Here] from 1 - 40 Increment 1 Create 1 Zergling at some point Issue Order to Last Created Unit to Attack Targeting Player 1 Starting Location
This will create 40 Zerglings all at once and attack. Additionally, if you want more of a stream of units instead of a large group, you can add "Wait 1.0 Game Time seconds" or any other value of your choice and they will spawn one at a time and attack. Play with the wait time to get a tight line or a widely spread line.
Thanks, just what i was looking for!
Hey guys. having a bit of trouble with this as well..
I'm spawning 5 zerglings.. and I want to order them to attack at a certain point. i've tried looking through the element lists for "for each integer, player in player group, real, and unit in unit group"
I've not seen the increment selection.. and I can only seem to order special abilities for specific unit types.. no basic "move, attack, patrol" etc..