Unit - Create 1 BanelingMissle for player 5 at ((Position of Hero) offset by 1.0 towards (Facing of Hero) degrees) facing (Facing of Hero) degrees (No Options)
Unit - Order (Last created unit) to ( Move targeting ((Position of Hero) offset by 60.0 towards (Facing of (Last created unit)) degrees)) (Replace Existing Orders)
Unit - Order (Last created unit) to (Baneling - Explode) (Replace Existing Orders)
So the Last Created Unit function requires the unit to be created through triggers?
What if it is created by a "Create Unit" ability in the Data Editor?
EDIT: Never mind! I got it working! I just had to give the Baneling a new behavior that explodes automatically once created. Thanks for your help though!
<<pre>>
Event: "Unit is created"
Unit - Any Unit creates a unit with Zergling - Morph Unit (Zergling -> Baneling) or Zergling (Burrowed) - Morph Unit (Zergling -> Baneling)
Note that if you've edited how a baneling is 'created' from the data editor, choose the appropriate ability from the options
Action: "Issue order"
Unit - Order (Created Unit()) to (Baneling - Explode) (Replace Existing Orders)
<</pre>>
EDIT: Never mind! I got it working! I just had to give the Baneling a new behavior that explodes automatically once created. Thanks for your help though!
Did you make it so the baneling gets this new behavior from the data editor, or a trigger?
If you did it in the data editor.... how? i'd like to know :) It would help me out some :p
Set target to Random Unit from Unit Group (Units in Region Matching Condition), set filters to Structure Required.
Or if you don't want random target you can use Unit Closest to Point or something.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How can I assign newly created units an order to use an ability instantly?
Create Unit
Order (Last Created Unit) to (Ability Command)...
@zachet: Go
I did that, and it failed to work.
@Nothing5: Go
Event -
A unit is created
Action
Order (triggering unit) to _
I have personally done this on my map for my psuedo-baneling-missle and appears to work.
Perhaps there's an issue with the ability you are ordering on the unit.
The unit has to have the ability to do this ability in the data editor, I don't believe it needs to be in the command card though.
@Grogian: Go
Where can I find that Event?
@zachet: Go
What about this: take a Baneling for example. How can I assign it an order to explode?
@Nothing5:
Unit - Create 1 BanelingMissle for player 5 at ((Position of Hero) offset by 1.0 towards (Facing of Hero) degrees) facing (Facing of Hero) degrees (No Options)
Unit - Order (Last created unit) to ( Move targeting ((Position of Hero) offset by 60.0 towards (Facing of (Last created unit)) degrees)) (Replace Existing Orders)
Unit - Order (Last created unit) to (Baneling - Explode) (Replace Existing Orders)
@zachet: Go
So the Last Created Unit function requires the unit to be created through triggers?
What if it is created by a "Create Unit" ability in the Data Editor?
EDIT: Never mind! I got it working! I just had to give the Baneling a new behavior that explodes automatically once created. Thanks for your help though!
Did you make it so the baneling gets this new behavior from the data editor, or a trigger?
If you did it in the data editor.... how? i'd like to know :) It would help me out some :p
@nZifnab: Go
I just applied this new behavior using the data editor.
First I created a new Behavior in the behavior tab (lol) and set it as a buff.
Named it "Auto-Explode", Effect - Periodic: Baneling - Explode, Period: 0.1, and gave the behavior to the Baneling unit.
Thanks for your codes by the way, they may come in handy pretty soon :D
Oh...obviously. Giving the behavior to the unit will make it start with that.
I'm half-retarded sometimes.
@nZifnab: Go
Haha don't worry, I'm always like that :P
how to get them to attack ONLY buildings?
Set target to Random Unit from Unit Group (Units in Region Matching Condition), set filters to Structure Required. Or if you don't want random target you can use Unit Closest to Point or something.