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

Help with triggers - Spawns

Status
Not open for further replies.
Level 2
Joined
Aug 14, 2011
Messages
11
I need help with triggering, i am making a Arena map, i need a trigger with a timer that spawns monster, and after they are killed it go to next round.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Well the answer depends on the spawning way you have but for example you can to this:

In GUI I think, I would do it like this: Create one trigger which gives data (time) to a timer ans start it.
In another trigger I would place the event "If (timer) expires", then spawn all units at once, store them into a unit group and run a third trigger. This third trigger runs every second and checks if the unit group is empty. If it is then turn off this trigger and run the first trigger again.
> So you get a looping.

[Well in vJass it would be much simpler but well - I don't know your skills^^]

Greetings and Peace
Dr. BøøM
 
Level 5
Joined
Feb 6, 2011
Messages
177
Thank you, but each spawn will be different units.

well i totally agree with dr.boom. but after your last comment i understand that u want to revive the units and not create other units !!!??
well if u want to revive the units that die you can add all these units in an array of type units and after all the loop of dr.boom finishes and its time to create unit .. instead of creating just revive the units that are stored in the array:goblin_yeah:
______________________________________________________________________________
and if you mean like each spawn is a different unit it goes like levels in a td map ?
then just all you need is to make this :
1- make a variable "integer that counts all the living units" if they are 0 then
2- make a variable "integer that will count the waves of the creeps" so when its like wave 1 all the creeps are of type felguard or when its wave 2 all the creeps are like voidwalker and goes like that
3- make a trigger that checks these variables and does the job
hope i helped
 
Level 2
Joined
Aug 14, 2011
Messages
11
and if you mean like each spawn is a different unit it goes like levels in a td map ?
Yes, and i am thinking in making a system that count how much players are in the map, and it spawns units equivalent to the players in map, to make it balanced when playing solo or with 5 players. For example: if are it have one players then will spawn 2 corrupted treants,and if are two then it spawn 2 more, so that do not make the map very easy.
 
Level 5
Joined
Feb 6, 2011
Messages
177
Yes, and i am thinking in making a system that count how much players are in the map, and it spawns units equivalent to the players in map, to make it balanced when playing solo or with 5 players. For example: if are it have one players then will spawn 2 corrupted treants,and if are two then it spawn 2 more, so that do not make the map very easy.

well i would say its not that hard its more like easy but it needs a lot of work
the concept is easy all you need to do is to make an another variable that will count the players ingame at the begging of the game
like
  • events
    • time elapsed equals 1 second
  • Conditions
  • Actions
    • pick every player and do actions
      • if controler of picked player equals human then
        • Variable= Variable +1
      • else
        • do nothing
  • turn off this trigger
  • turn on game start
game start trigger will be the trigger that will define on which set of triggers you go
i mean like if u have a trigger for only spawning 2 units and another 1 for spawning 4 units and like that
so in the game start trigger you check the Variable. if its equal to 1<1player in map> then turn off this trigger and turn on the trigger that works for spawning 2 creeps and if variable = 2 <2 players in map> then u go for the trigger that spawns 4 creeps and turn off this trigger
hope u got the idea
or if u need help i can help u working on this map
 
Level 2
Joined
Aug 14, 2011
Messages
11
Thank you for you help, i see that this will really work to count players, but if i am about to make 50 rounds/levels? i will have to make a lot of triggers?
 
Level 5
Joined
Feb 6, 2011
Messages
177
Thank you for you help, i see that this will really work to count players, but if i am about to make 50 rounds/levels? i will have to make a lot of triggers?

i guess yes but you could think about it in a mathematical programming way .. u can make the levels in arrays and like that.. just think about it ..coz at this moment my brain functions verybad its 4 am in here XD
i will try to make something familiar and if it works with me i will upload the map and give it to you
 
Level 2
Joined
Aug 14, 2011
Messages
11
it will be very kind of you, ok, i will think of it, meanwhile i will be doing the other stuff like skills, itens and heroes.
 
Level 2
Joined
Aug 14, 2011
Messages
11
wow that was exactly what i was looking for. Thank you, i will put on my map and give credits. But i am having trouble with the timers, i dont know where exactly put them in the triggers.
 
Level 5
Joined
Feb 6, 2011
Messages
177
wow that was exactly what i was looking for. Thank you, i will put on my map and give credits. But i am having trouble with the timers, i dont know where exactly put them in the triggers.

good that i helped. timers
well the timers are an another way of the use "Wait trigger" as wait trigger leaks
the timers are not that complicated thing
just make a timer on the place of the wait function and detect when its off
here is an upward counting timer tutorial from hiveworkshop that could be usefull
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/upwards-counting-timer-175541/
 
Status
Not open for further replies.
Top