• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How do u make zombies attack base and units?

Status
Not open for further replies.
Level 5
Joined
Jun 27, 2010
Messages
73
Alright im a bit noobish to making triggers. Im making a zombie map and i added a HQ base. If HQ dies it ends game and the marines loose. I want the zombie attackers to attack it but also attack everything eles thats in their paths. I dont want a zombie to be lure and be attakcing the hero the whole time. So How do i make a trigger for this?:vw_death:
 
Level 3
Joined
May 22, 2011
Messages
68
zombieattacktrigger.jpg


Just replace "Every 2.00 seconds" with the frequency with which you want the zombies to attack, "owned by Player 2(blue)" with the name of the player who owns the zombies, and "Center of Region 000 <gen>" with the name of a region you mark at the center of the marine base.

I am a noob too, though, and I have not actually tried it. It should work, in theory. Let me know. :wink:
 
Level 5
Joined
Apr 22, 2008
Messages
139
Try this:
  • Zombie Attack
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to Player 2 (Blue)
            • Then - Actions
              • Unit - Order (Picked unit) to Attack-Move To (Center of Region 000 <gen>)
            • Else - Actions
I tested it and it worked fine.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
The first part of your initial post indicates that you should use the "Attack-move" command (if you order a unit to attack-move, he will attack anything in it's path until he has reached his destination - which should be the HQ).
So from the moment you spawn a zombie, you should immediately order him to attack-move the HQ.

Something like this:
  • Spawn
    • Events
      • Time - Every 1.50 seconds of game time
    • Conditions
    • Actions
      • Set tempLoc = (Random point in Zombie Region)
      • Unit - Create 1 Zombie for Player Zombie at tempLoc facing 0.00 degrees
      • Custom script: call RemoveLocation(udg_tempLoc)
      • Unit - Order (Last created unit) to Attack-Move To HQLoc
Where "HQLoc" is set at map initialization and is the location of the Headquarters.
The event doesn't matter. It's just a spawn, don't literally copy this trigger.

But I couldn't quite figure this out:
I dont want a zombie to be lure and be attakcing the hero the whole time. So How do i make a trigger for this?
Do you mean that they should prefer targeting the HQ instead of the heroes?
Then maybe this could work:
  • Target HQ
    • Events
      • Unit - A unit comes within 500.00 of HQ
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player Zombie
    • Actions
      • Unit - Order (Triggering unit) to Attack HQ


@rAmPaGingONI:
That's the exact same as Moon Mover's trigger... Moon Mover picked all units that belong to player 2, you pick all units and check whether they belong to player 2.
Also: if you order them to attack-move, they will still target the heroes that are attacking them.
 
zombieattacktrigger.jpg


Just replace "Every 2.00 seconds" with the frequency with which you want the zombies to attack, "owned by Player 2(blue)" with the name of the player who owns the zombies, and "Center of Region 000 <gen>" with the name of a region you mark at the center of the marine base.

I am a noob too, though, and I have not actually tried it. It should work, in theory. Let me know. :wink:

You can copy triggers with right click > copy as text

instead of taking a screenshot ;) cheers
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
What you are after doing is if zombies start to be kited in circles they start going straignt for the base. Additionally you could lower the aquisition range of some of the zombies via triggers so they will be less wiling to run off after heroes and more willing to continue to their target (the base).

Giving the base a weak attack will greatly improve its agro as units tend to go for combat units before civilian (no attack) ones.
 
Status
Not open for further replies.
Top