• 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 in 2 Triggers

Status
Not open for further replies.
Level 4
Joined
Jul 11, 2015
Messages
58
Hey, the first trigger is:


I made it in a way when the 1st wave completes it starts wave 2 by killing 1 unit-triggered event and like that entire wave system (i did it all myself :D). I want add a lot of waves later on and i wanted to know if there's a other way to start the wave 2 without making it killing a Unit-Triggered Event.

Trigger 2 is:


The spawning system sucks monkey ballz, the people from the previous wave didn't even finish it and the next wave is already started and the creeps are over-flooded thoroughly the entire map and it causes a lot of bugs and FPS Drops. How do i fix this trigger to make it in a way if Wave 1 all creeps are RIP then continue to Wave 2

Sorry for wrong section but i need also 1 more quick question, grammar fix. We don't speak English very well in Slavic countries like Russia Macedonia Serbia Bulgaria since no english study classes here we learn only from games and computer and i'm from one of them, so can someone with a profesional english fix the grammar of "The Rocket Launcher uses a new Explosive Rockets that they explode with such a force they damages multiple enemies with its explosion." - Its for a spell of a new class i'm working on right now (3 classes left before i release the new version, its fucking amazing) I have 2 names of the spells, don't know which one should i use: Explosive Rockets, Splattering Rockets
 
Last edited:
Level 29
Joined
Sep 26, 2009
Messages
2,596
Make a "Unit Group" variable. I'll call this variable ZombieGroup. Whenever you create zombies, add them to this group (there's a "Unit Group - Add unit to unit group" action or another action in the unit group category which allows you to add all units of specified unit group to another unit group).

Make a trigger which has an event "Unit - A unit dies" (a generic event which fires for any unit). Check if said unit is in unit ZombieGroup (that condition can be found under "Boolean" comparison category -> "Unit - Unit in unit group" or something like that).
If it is, check if number of alive units inside ZombieGroup is greater than 0 (or the reverse way: if all units within unit group are dead). The "greater than 0" is in integer comparison category, while the "all units in unit group are dead" is in boolean comparison. Just pick one.

If the condition passes, make an action which removes all unit from unit ZombieGroup (the action is in "Unit Group" category) and start next wave.


Your FPS drops are most likely the result of memory leaks. The "Spawning" trigger for example causes 6 memory leaks every 5 seconds. That ain't that much, but it may accumulate (considering you probably have other triggers in your map that leak as well). To get the idea of what leaks and how to prevent memory leaks, check this thread: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 9
Joined
Dec 12, 2007
Messages
489
you could do it by having
an unit-type array variable TYPE for storing spawned unit-type,
an integer array variable NUM for storing spawned unit amount and
an integer variable WAVE for counting wave.

set the initial value of Wave = 1
set the TYPE[1] = unit type of wave 1
set the NUM[1] = 10 (wave 1 consists of 10 units of TYPE[1])
set the TYPE[2] = unit type of wave 2
etc...

create a trigger with an event of every 0.5 seconds game time.

in the trigger action, check if the amount of TYPE[WAVE] == 0,
if TYPE[WAVE] == 0, then set WAVE = WAVE + 1,
and spawn NUM[WAVE] amount of TYPE[WAVE] unit-type to each spawn point.

sorry can't give sample trigger right now, didn't have access to WE right now.
 
Status
Not open for further replies.
Top