well, you could spawn them via triggers (Create Units) and then just use Issue Order to Unit group and use Last Created Unit Group
Or you can use a trigger with the event "Any Unit is Created" and use a condition to check whether its a hydralisk
You could also create a dummy effect (An empty "Set" effect or something) and put it as the "Spawn Effect" field in the "Create Unit Effect", then have a trigger use that effect as an event and issue an order to the Target of the effect
If there's only one enemy command center in the game, you could create a validator in data that checks whether target unit is a command center, create an Issue Order effect that uses that validator and issues an attack order (and targets the point. You might have to put something like a set effect in between to use the vaidator instead because the validator might be checking a point if you put it directly onto this effect, which obviously won't work), then add a search effect as the Spawn Effect of the effect that creates the hydras, have that search effect search the entire map for units (Use filters to make it a bit more efficient, validator will take care of actually targetting the command center) and uses the issue order effect (Or whatever effect you put inbetween)
In any case, make sure that the order you issue targets a point, not a unit (In triggers you can use "Position of Unit" in a point paramater), that way the units will attack anything that crosses their path.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
well, you could spawn them via triggers (Create Units) and then just use Issue Order to Unit group and use Last Created Unit Group
Or you can use a trigger with the event "Any Unit is Created" and use a condition to check whether its a hydralisk
You could also create a dummy effect (An empty "Set" effect or something) and put it as the "Spawn Effect" field in the "Create Unit Effect", then have a trigger use that effect as an event and issue an order to the Target of the effect
If there's only one enemy command center in the game, you could create a validator in data that checks whether target unit is a command center, create an Issue Order effect that uses that validator and issues an attack order (and targets the point. You might have to put something like a set effect in between to use the vaidator instead because the validator might be checking a point if you put it directly onto this effect, which obviously won't work), then add a search effect as the Spawn Effect of the effect that creates the hydras, have that search effect search the entire map for units (Use filters to make it a bit more efficient, validator will take care of actually targetting the command center) and uses the issue order effect (Or whatever effect you put inbetween)
In any case, make sure that the order you issue targets a point, not a unit (In triggers you can use "Position of Unit" in a point paramater), that way the units will attack anything that crosses their path.