Tutorial How Create Maps With Wave Spawning Creeps

SpartanWho

New Member
Reaction score
0
Hey guys and gals!

My friends and I became very interested in creating maps like Enfo's Team Survival and Towe Defense, and I've found it enjoyable to do. So, I thought I'd make a tutorial on how to pull these things off!

So... Let's begin!


Chapter One: Finding Inspiration

A lot of people NEVER include this step in tutorials, but, for me, it's the most difficult one. The way I always find my inspiration is just natural. I'm usually hanging out with friends of playing WC3 online and I think, "Wouldn't it be cool if..." and, BAM, you've got an idea! Inspiration isn't something you can look for, it'll come find you. You just need to wait for it.


Chapter Two: Let's Start With Terrain!

Next, you're going to have to create some terrain for your map to be played in. I'm not going to post any screenshots as to what I prefer to use, it's a personal preference for the creator. Take a look at some of the maps like Enfo's and TDs to find what works and what doesn't.


Chapter Three: Now Begins The Hard Part (Sorta)

Okay, now that we've got some terrain to play in, we need something to PLAY. We can start with the Wave Spawning Triggers. My method consists of four different triggers that all interact.

We'll start with the Creeps Initalization:

Trigger:
  • Events
    • Map Initilazition
    • Conditions
    • Actions
      • Wait 20.00 Game-Time Seconds
      • Set Round = 1
      • Set Creeps_Alive = 20
      • For Each (IntegerA) from 1 to 20, do Actions
        • Loop - Actions
          • Wait 0.75 Game-Time Seconds
          • Unit - Create 1 Creeps[Round] for Player 5(Yellow) at (Center of Spawn <gen>) Facing Default Building Facing Degrees


Now, let's explain this Trigger:
1) Map Initalization - Runs this trigger ONLY when the Game starts
2) Wait 20.00 Game-Time Seconds - Inital Delay to allow Race/Hero Selection, etc.
3) Set Round = 1 - Round is an Integer Variable
4) Set Creeps_Alive = 20 - This assumes you're spawning 20 Creeps. Creeps_Alive is a Real variable
5) For Each (IntegerA) from 1 to 20, do Actions - This does the below actions 20 times (change the second number to the number of creeps you want to spawn)
6) Wait 0.75 Game-Time Seconds - Spaces out the Creeps to prevent movement glitches
7) Unit - Create 1 Creeps[Round] for Player 5(Yellow) at (Center of Spawn <gen>) Facing Default Building Facing Degrees - Due to the loop 20 times, this will create 20 creeps from the Index [Round] of the Unit-Type Array called Creeps.

Now, that was just the inital spawning of Creeps. We'll have to write ANOTHER trigger to make the rest of the Creeps spawn.


Chapter 4: Creep Spawning Part 2

The trigger for spawning creeps from then on out is:

Trigger:
  • Events
    • Game - Creeps_Alive becomes Equal to 0.00
    • Conditions
    • Actions
      • Wait 5.00 Game-Time Seconds
      • Set Creeps_Alive = 20
      • For Each (IntegerA) from 1 to 20, do Actions
        • Loop - Actions
          • Wait 0.75 Game-Time Seconds
          • Unit - Create 1 Creeps[Round] for Player 5 (Yellow) at (Center of Spawn &lt;gen&gt;) facing Default Building Facing Degrees


I won't bother disecting this one, as the entire system is explained later and it's essentially the same as the first trigger.


Chapter 5: Creep Spawning Management

Well now the Creeps will spawn the first time, but the triggers aren't complete. Now we need a way to keep the number of Creeps recorded and keep the Round increasing when all of the Creeps are dead.

This trigger manages the number of Creeps alive and the variable Round:

Trigger:
  • Events
    • A Unit Owned by Player 5 (Yellow) Dies
    • Conditions
    • Actions
      • Set Creeps_Alive = (Creeps_Alive - 1.00)
      • If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Creeps_Alive Equal to 0.00
        • Then - Actions
          • Set Round = (Round + 1.)
        • Else - Actions
          • Do Nothing


This is a pretty simple Trigger. Basically, when a Creep Unit (Player 5) dies, then subtract one from Creeps_Alive, then check if Creeps_Alive is equal to zero (remember it was originally set to 20). If Creeps_Alive is equal to 0, then add one to Round.


Chapter 6: Defining Creeps

This is an easy trigger. It deines the Indexes for the Unit-Type Array Creeps.

Here it is:
Trigger:
  • Events
    • Map Initalization
    • Conditions
    • Actions
      • Set Creeps[1] = Peasant
      • Set Creeps[2] = Militia
      • Set Creeps[3] = Peon
      • ...


From there, just define as many Creep types as you want to have in waves.


Chapter 7: How It All Works

Now, let's UNDERSTAND how all of this works. Since when all of the creeps are dead, the round increases, and the Creeps spawned are equal to the Index Round, which in an Integer! Now, the type of creeps spawned will change every wave!!!

This was my first tutorial and I'll be expanding on it soon, but, in the meantime, please give me any comments and criticism you may have!

Best Regards,
SpartanWho
 

Azlier

Old World Ghost
Reaction score
461
You might want to try leakless triggers, instead.

Although that's probably some of the most efficient GUI I've ever seen.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Since this really only covers the basics of TD spawning maps, why not simply name this tutorial "How to Trigger TD Wavespawning"?

This is also not a very explanatory tutorial. The idea of a tutorial is that you are teaching the user how to do something essential, not simply giving them the triggers. As of currently, it would go better in the snippets section.

Chapter Two does not go well in a tutorial on how to create certain triggers. They've apparently already got a map they're trying to make, and it's not really helpful to say "look at examples." Try giving a few broad tips, or analyzing a few popular maps to show why these maps are fun to play, and why they are popular.

Also, please do not hand-write triggers you are making for a tutorial. It looks sloppy.
 

SpartanWho

New Member
Reaction score
0
You might want to try leakless triggers, instead.

Although that's probably some of the most efficient GUI I've ever seen.

Uh... Leakless? :banghead: Sorry for the ignorance, I'm not new to the Editor, but I'm unfamiliar with some terms used by others.

Considering that Enfo's had about 100 actions per trigger for spawning waves, I'd consider pretty efficient, although I haven't really tried to make it even more compact.

Best Regards,
SpartanWho
 

Sevion

The DIY Ninja
Reaction score
413
Consider this, what if (somehow) right in the middle of the round, ALL units die. HOWEVER, there are some still "spawning". So, half of the round spawned, half haven't.

The triggers will fire, and the round will move to the next.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top