I've made a map with spawned "zombies" at various point in the map. I want it to be a melee map, with the "zombies" assigned to Player 15, and therefore hostile to all other players/computers. I can spawn the zombies on their points off a timer with no difficulty, however they are not responding to the issue attack order I've made.
The trigger is as follows:
Periodic Order
Events
Timer - Every 10.0 seconds of Real Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player 15 matching Excluded: Missile,
Dead, with at most Any Amount) and do (Actions)
Actions
Unit - Order (Picked unit) to ( Attack targeting (Position of (Closest unit to (Position of (Picked unit))
in (Any units in (Entire map) owned by player Any Player matching Excluded: Self, Resource (Raw), Resource
(Harvestable), Missile, Item, Buried, Cloaked, Dead, Hidden, Invulnerab (Replace Existing Orders)
I've set a revealer in the map init trigger for Player 15 to reveal the entire map, so that the units should be able to attack their targets. What am I doing wrong?
Unit - Order (Picked unit) to ( Attack targeting (Position of (Closest unit to (Position of (Picked unit))
What is closest unit.... and secondly if that "Closest unit" is a value action then i would think you would need to verify that the closest unit is an enemy unit other wise it will select allied unit and then do nothing because it cant attack allies......
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
Look at my zergling attack AI tutorial on my youtube page. It's exactly what you want, except my zerglings are searching for Heroic, and all player units are classified as heroic attribute. Perhaps you could use biological or something different for your case since you probably don't want all players' units having 'heroic' on them. They key is to give something to player units that classifies them different than zombie units.
Noble just when you use closest unit ....... It needs to be closest unit from unit group
... or else you need to loop through a unit group and find the closest one
I actually did get the trigger off your tutorial OneTwo, but until SouL brought up the allied unit problem, I hadn't given a second thought to the "required: heroic" that you had used that I obviously hadn't. Thanks guys, I think this was the breakthrough I needed. You've both saved me from some serious continued frustration.
and a further thanks to you OneTwo... you tutorial is the only reason I was able to even get this damn map off the ground to start with.
I've made a map with spawned "zombies" at various point in the map. I want it to be a melee map, with the "zombies" assigned to Player 15, and therefore hostile to all other players/computers. I can spawn the zombies on their points off a timer with no difficulty, however they are not responding to the issue attack order I've made. The trigger is as follows:
Periodic Order
Events
Timer - Every 10.0 seconds of Real Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player 15 matching Excluded: Missile, Dead, with at most Any Amount) and do (Actions)
Actions
Unit - Order (Picked unit) to ( Attack targeting (Position of (Closest unit to (Position of (Picked unit))
in (Any units in (Entire map) owned by player Any Player matching Excluded: Self, Resource (Raw), Resource (Harvestable), Missile, Item, Buried, Cloaked, Dead, Hidden, Invulnerab (Replace Existing Orders)
I've set a revealer in the map init trigger for Player 15 to reveal the entire map, so that the units should be able to attack their targets. What am I doing wrong?
Thanks in advance.
cant you just tell 'last created unit' to attack region 'entire map' or something 100x simpler.. im making a zombie map too, and that's what i do.
has that worked for you? I've tried using "last created unit" triggers on them, and they seemed to be ignoring them as well...
This makes no sense
Unit - Order (Picked unit) to ( Attack targeting (Position of (Closest unit to (Position of (Picked unit))
What is closest unit.... and secondly if that "Closest unit" is a value action then i would think you would need to verify that the closest unit is an enemy unit other wise it will select allied unit and then do nothing because it cant attack allies......
I wanted to have them "randomly" attack the nearest unit... I hadn't considered the allied unit trouble...
Is there a way to have them target enemy units? Perhaps lump all active players in a player group and have them target the player group?
@NobleKenshi: Go
Look at my zergling attack AI tutorial on my youtube page. It's exactly what you want, except my zerglings are searching for Heroic, and all player units are classified as heroic attribute. Perhaps you could use biological or something different for your case since you probably don't want all players' units having 'heroic' on them. They key is to give something to player units that classifies them different than zombie units.
Noble just when you use closest unit ....... It needs to be closest unit from unit group
... or else you need to loop through a unit group and find the closest one
I actually did get the trigger off your tutorial OneTwo, but until SouL brought up the allied unit problem, I hadn't given a second thought to the "required: heroic" that you had used that I obviously hadn't. Thanks guys, I think this was the breakthrough I needed. You've both saved me from some serious continued frustration.
and a further thanks to you OneTwo... you tutorial is the only reason I was able to even get this damn map off the ground to start with.