• 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.

Scripting Monster Spawn

Status
Not open for further replies.
Level 1
Joined
Dec 5, 2013
Messages
5
Hi guys,
I started a new map but I have problems with triggers because I never use it before,I
would like a system of spawn/wave like that:

The waves spawn only x secondes after all monsters of the last wave are dead

The monsters spawn randomly around (ex 20 at 50m) heroes and attack them

All waves can be changed (number of monsters,type of monster)

There is a wave for all players(ex: if they are 2 players and the wave 1 is 5 zombies, 5zombies will spawn to attack the hero of player 1 and 5 zombies will spawn to attack the heroes of player 2

Thank!

Sry for my bad english
 
Last edited by a moderator:
Level 26
Joined
Aug 18, 2009
Messages
4,097
I started a new map but I have problems with triggers because I never use it before

That you should do. If you just want to copy triggers from here that you do not understand, which would be a request by the way, you can make zero adjustments and exactly acquiring what you want can be a problem because for this, we would need to know the task as exactly and it may be environment-dependent. So it's better to learn the methods and at least vaguely get the logic beneath it. Get a basic grasp about triggers, they are fundamental for every customized scenario you want to realize in wc3.
 
Level 1
Joined
Dec 5, 2013
Messages
5
Yes,someone helped me to create the system but we have a problem,the number of zombie in the first wave is wrong,and the second wave don't spawn,we don't find where is the bug :angry:

Its the system:

1386372360-settings.png


1386372379-loop.png


1386372382-order-loop.png


1386372386-order-zombies.png


1386372390-zombie-death.png


1386372393-variables.png
 
This is way more complicated than it needs to be.

To make a wave system. You need a unit type array filled with the units you want to spawn. You need an integer array to keep track of how many units you want to spawn.
And an integer that starts at 0
Then in a periodic trigger increase the integer and use that integer as the index for the unit type array and the number of units you want to spawn.
 
Level 6
Joined
Jan 8, 2009
Messages
140
mocked this up for you, the events can be changed but as it is you set the type by typing 'type: x' x being the unit type array number then set the number with 'number: x' x being the number of units. when the units are all dead the next wave should spawn.
 

Attachments

  • spawn.w3x
    9.6 KB · Views: 58
Level 1
Joined
Dec 5, 2013
Messages
5
I don't really understand :( , i must totally restart my triggers or change the first part 'setting' ?
 
Level 6
Joined
Nov 5, 2013
Messages
132
Okay, after 3 hours I have resolved the problem.
Now pay attention:

1) Edit the unit group variable "ZS_Group". Look at the picture "VariableEdited".
2) On Loop change ZS_Current_Types [ZS_LoopC] with ZS_Current_Types [ZS_LoopB] and update the ZS_Group. Look "LoopEdited".
3) Update the others ZS_Group in all triggers. Look "OrderZombiesEdited" and "ZombieDeathEdited".

Now you have the correct number of zombies per wave/player and correct spawns in all waves.
Have nice zombies day! :)
 

Attachments

  • VariableEdited.jpg
    VariableEdited.jpg
    123.4 KB · Views: 106
  • LoopEdited.jpg
    LoopEdited.jpg
    258.1 KB · Views: 140
  • OrderZombiesEdited.jpg
    OrderZombiesEdited.jpg
    221.9 KB · Views: 112
  • ZombieDeathEdited.jpg
    ZombieDeathEdited.jpg
    274.5 KB · Views: 128
Status
Not open for further replies.
Top