• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to make a TD

Level 8
Joined
Jun 16, 2008
Messages
333
How to make a TD
Hello, welcome to my tutorial on how to make a TD. If you do not know what a TD is then go Google it.
Step 1-Terrain
-First you are going to want to create a new map. (doesn't matter how big or what terrain)
-The next thing you are going want to do is make the terrain. (Window - New Palette - Terrain)
-Then you are going to want to build where the runners are going to walk. You want to get a unbuildable terrain and if you want you can lower a level or increase if you want. (not mandatory) When doing the walking terrain you want to be even.
Now you are finished with step 1, lets go on to step 2.

Step 2-Objects
-First you want to open your Object Editor and go to Units.
Levels
-Then you want to make a new custom unit and name it whatever you want. (this will be your level 1 runner)(Also in Text-Name- Editor Suffix put Level 1+)
-Then you want to look for Stats and edit his bounty gold and put his hit points at 150 and regeneration none. (keep going up with hit points every level)
Towers
-Now you want to make a custom unit but make it a Guard Tower. (Name it whatever you like)
-Make sure you take off all abilities, then change the damage base to 19. The cooldown time 0.70. Lastly select the Targets allowed and make it attack what you want. (If you want it to have a splash but what kind of splash you want)
-You can change the model file and the icon if you want, doesn't really matter.
-Then you are going to want to goto stats and click build time and change it to 1.
-Next you are going to want to change the gold cost of it to 10(any number)
then go to limber and put 0.
-Then go to techtree and remove everything from requirements and upgrades used. (if you are going to have it upgrade to another tower then click Upgrade To and put what tower you want it to upgrade to)

Build as many towers you want and runners to. Now your are done with the creating the towers and runners time to get to something faster.

Step 3-Triggers
-First you want to open the Trigger Editor
-Then you want to delete all existing folders/triggers in it.
-Next you are going to want to make a region for every turn, every spawn for the walkers and a finish. (Name them like Turn 1, turn 2, ect. and the finishing region END)
-Now you are going to make a new trigger called "Runner Turn" (Trigger should look like this)
  • Start1
    • Events
      • Unit - A unit enters CreepSpawn 1 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • Unit - Order (Entering unit) to Move To (Center of Turn1 <gen>)
(you are going to want to do this for every turn till the finish)

Unit Creator
For every spawn you should have a region and you want the runners to start there so you are going to want to make a variable called unit_type and have it be Unit Type, then you are going to want to make a trigger like this

  • Level Start
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Coming at you, Level + ((String(Level)) + !))
      • Countdown Timer - Pause Timer
      • Countdown Timer - Hide TimerWindow
      • Wait 2.00 seconds
      • Unit - Create 60 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 7 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn7 <gen>)
      • Unit - Create 60 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 6 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn6 <gen>)
      • Unit - Create 60 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 5 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn5 <gen>)
      • Unit - Create 60 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 4 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn4 <gen>)
      • Unit - Create 40 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 3 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn3 <gen>)
      • Unit - Create 40 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 1 <gen>) facing (Center of Turn7 <gen>)
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn1 <gen>)
      • Unit - Create 30 UNIT_TYPE_WAVE for Player 12 (Brown) at (Center of CreepSpawn 2 <gen>) facing (Position of (Triggering unit))
      • Unit Group - Order (Last created unit group) to Move To (Center of Turn1 4 <gen>)
      • Wait 5.00 seconds
      • Trigger - Turn on Level Finish <gen>
( this is what it would look like for every spawn)
After you got that now you are going to want the wave to be a special unit so make a variable called level and make it an integer and have it at 1. Now make a trigger like this
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • Wave Type
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level Equal to 1
        • Then - Actions
          • Set UNIT_TYPE_WAVE = Level 1
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level Equal to 2
        • Then - Actions
          • Set UNIT_TYPE_WAVE = Level 2
        • Else - Actions
          • Do nothing
( do this for every level of units you have)

Now the level finish
  • Level Finish
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Player 12 (Brown) Food used) Equal to 0
    • Actions
      • Set Level = (Level + 1)
      • Trigger - Run Wave Type <gen> (ignoring conditions)
      • Game - Display to (All players) the text: You Survived This W...
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Show TimerWindow
      • Game - Display to (All players) the text: Next Wave Coming in...
(don't go crazy like wtf where did the timer come in from, I'll show you later) Plus you want to turn off the initially on.

Now for the timer.
You want to make 2 variables "Timer Window" and "Timer" They will be what you name them. Now make a Trigger like this
  • Game Start
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Visibility - Disable fog of war
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
      • Wait 10.00 seconds
      • Game - Display to (All players) the text: First Wave coming i...
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
      • Set Timer = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title Next Wave in:
      • Set TimerWindow = (Last created timer window)
      • Trigger - Run Wave Type <gen> (ignoring conditions)

Now for starter time
Make a region for all the players you want in your game.
Now make a trigger like this
  • Events
    • Time - Elapsed game time is 3.00 seconds

Now you are done with this Map save it and play it. Have fun!
 
Level 31
Joined
May 3, 2008
Messages
3,155
http://www.hiveworkshop.com/forums/...t-tutorial-please-read-before-posting-119320/

Don't use size 7 for your tutorial, used what was mention at py thread.

There is a TD tutorial exist, even though it could be consider as outdated.

Yours was latest, but it isn't make any differ and your triggering was bad and encourage inefficient trigger.

Your triggering leak, using wait action and could use loop to cut off most of the action.

Also, why do you add Do Nothing. They're particaly useless action that called another action that does nothing at all.

The if/then/else isn't set properly either.

As for the level, you could easily set level = level then level = level + 1 and set unit type wave = set unit type wave + 1.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Title said:
How to make a TD
Not like this, I can tell you that.

Check the attached map and learn from it, that's how people should create TD's with GUI (there are some other methods, but I personally prefer this one).

You can have an infinite amount of levels with an infinite amount of checkpoints without having to add a single trigger.
You can easily adjust the unit type, amount, level classification, time interval between each spawn (units spawn 1 by 1), gold when completing level and basically anything else that can be modified (such as sound effects, special effects, spawn timer, special event, ...).
That's basically how you create a TD.
 

Attachments

  • Sample TD.w3x
    24.6 KB · Views: 94
Top