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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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