Creating a zombie map...

Eskemoenn

Member
Reaction score
2
Hey i was trying to create a zombie map, but i got some issues i jsut cant get to work!
a wave of zombies is spawning
i want those zombies to attack some random player (1-6)

Could anyone help ?
 

LearningCode

New Member
Reaction score
24
If you're spawning only one type of zombie..
And the player controls only one hero..

Create 20 Zombies at Region
Pick every unit in (Random 1 units from (Units in (Playable map area))) and do actions
Loop
Order (Last created unit group) to attack picked unit.
End Loop

I think
 

LearningCode

New Member
Reaction score
24
Don't use custom script!

lol.

I just put that in there so you know when to stop reading the GUI trigger xD
That's everything there is.

Loop means, "Repeat this action for each (Pick unit)"
Since we only picked 1 unit.
It'll happen only once.

I think.
I ain't the right guy to help you, but I do try xD

Test it?
 

Ayanami

칼리
Reaction score
288
Do you want the whole spawn to attack a single player or every units from the spawn to attack different heroes?
 

Sneakster

Active Member
Reaction score
24
Yeah continuing on with LearningCode, here is an example that I came up with:

Trigger:
  • Zombie Attack Player
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set SpawnLoc = (Center of Zombieland <gen>)
      • Set ZombieGroup = (Units in Zombieland <gen> owned by Neutral Hostile)
      • Set Humans = (Units in (Playable map area) owned by Player 1 (Red))
      • Unit - Create 100 Flesh-Eating Zombies for Player 1 (Red) at SpawnLoc facing Default building facing (270.0) degrees
      • Unit Group - Pick every unit in ZombieGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack (Random unit from Humans)
      • Custom script: call RemoveLocation(udg_SpawnLoc)
      • Custom script: call DestroyGroup(udg_ZombieGroup)
      • Custom script: call DestroyGroup(udg_Humans)


It spawns the zombies, sets them to their own group, and then orders them to attack a random unit for a specific player.

EDIT: You need to be more specific. We don't know if you want Zombies to Attack-Move to a region, attack a random unit, each zombie to attack something different, zombies to attack a player's base...we don't know. You can't attack a player. They are represented in the game by their units...
 

LearningCode

New Member
Reaction score
24
Assuming Player 12 is the "Computer" controlling the Zombies..
Try this:

Set UnitGroupPlayer = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of Player 12) Equal to True)
Order (Units owned by (Player 12)) to Attack (Random unit from (UnitGroupPlayer))


[Edit]
Above example is better.

[Edit2]
What?
No "Strikeout" code?

Damn.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top