• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

units not attacking??

Status
Not open for further replies.
Level 2
Joined
Dec 19, 2010
Messages
12
I have a few triggers that spawn some burrowed zerglings, put them all in a unit group then order them to unburrow and attack the center of a region. Problem is they just unburrow and sit there.
Command i used is
Unit - Order (picked unit) to (attack targeting(center of RegionX)) (replace existing orders)

I've also tried the "order all units in unit group" and messed around with "before existing orders" "after existing orders". Nothing seems to work.

ok so if i make the units regular zerglings (that dont spawn burrowed) it works fine... BUT i really want the zerglings to spawn burrowed then unburrow and attack. It looks a lot better if someone is in the region and zerglings pop out of the ground instead of just appearing

Ok figured it out... threw in a 2 sec wait after they unburrow before they attack. I dunno why "after existing orders" won't accomplish the same thing but i'm happy.
 
Last edited by a moderator:
Probably one of two reasons:

1) Attack targeting is set to a unit, instead of a location (this is changed by double clicking the Unit - Order function)

2) Your trigger is telling the units to immediately cast unburrow and immediately attack x. The problem is the way unburrow works is you are not able to issue a command to an unburrowing unit right away. You must wait a few microseconds until it is able to receive commands again. If you're a zerg player, you know what I'm talking about.

I'm going to go with option 2. Your solution is;

Event: _______
Condition: _______
Event: -> Issue order to _____ (unburrow).
-> Wait 1 Real Time seconds
-> Issue order to ______ (attack targeting _______)

Edit: I just saw your edit lol glad to know you solved it, but just so you know "after existing orders" wont work because it uses the line of progression as a reference (for example you give the unit 3 commands to move to 3 different locations, one after another (usually done with shift)) and you use after existing orders, it will add the ability you want to add to the end of the list, and thus the unit now has 4 commands to do.

However the unburrow wait time isn't actually recognized by the system. If you tell the engine to order the unit to move right away, it will, but if the unit is still locked up from unburrowing then it physically can't, and instead will just stand there like nothing happened (by giving an order to the zergling while its unburrowing you're not really telling it to do anything, it's not using the line of progression or anything). Thus if you tell the engine to wait a second before telling the unit to move, it will wait, and then give the order (thus effectively causing the unit the move after it's done unburrowing).

I'm not sure if I was clear with any of this.. you essentially have to think outside of the box.
 
Status
Not open for further replies.
Top