Go Back   Gamerz-Forum.Com > Gaming > Warcraft 3 > Tutorials

Tutorials Warcraft 3: World Editor Tutorials and Tips. To submit a tutorial, post it in the Warcraft 3 section. A moderator will read and approve it if it is up to standards.

Comment
 
LinkBack (1) Tutorial Tools Display Modes
[Tutorial] Basics Of A TD
Published by ragingspeedhorn
04-26-2007
[Tutorial] Basics Of A TD

Basics Of A TD

by: ragingspeedhorn

Note: This tutorial will explain you the very basics of making a TD. This is in no way geared towards experienced modders but is made for the beginners within Warcraft III modding.


What is a TD?

TD stands for Tower Defense and is a genre of maps developed for the Warcraft III engine. In a TD your goal is to build towers to prevent creeps of reaching a certain destination.


So.. How do I create one?

A good way of starting on a TD is to firstly make the terrain you find fitting for your map and then determine the lanes and setting up the pathing system (the creeps movement).


Uhh right, so how do I do that?

To get the creeps to move from 1 place to another you will need to make regions at the desired locations and then trigger the movement like this (the Trigger Editor is located inbetween the Terrain Editor and the Sound Editor):


Note: I will use Player 12 (Brown) as the "bad guys". Also some of these triggers can cause leaks, if you wish to know how to fix this then go here: [Only registered and activated users can see links. ]

Movement Region 1
Code:
    Events
        Unit - A unit enters Spawn Region
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Order (Entering unit) to Move To (Center of (Centre of Region1))

Movement Region 2
Code:
    Events
        Unit - A unit enters Region1
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Order (Entering unit) to Move To (Center of (Centre of Region2))

Movement Region 3
Code:
    Events
        Unit - A unit enters Region2
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Order (Entering unit) to Move To (Center of (Centre of Region3))

Movement Region 4
Code:
    Events
        Unit - A unit enters Region3
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Order (Entering unit) to Move To (Center of (Centre of Region4))

Movement Region 5
Code:
    Events
        Unit - A unit enters Region4
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Order (Entering unit) to Move To (Center of (Centre of End Region))

[Only registered and activated users can see links. ]

Note: This tutorial is mostly counting for none-mazing TD's. If you try to do a mazing TD with the same pathing system that I have done in the screenshot above this then the creeps will simply run past the towers, to prevent this from happening have the area being walled in or raised.


Ok done, now what?

Next is the actual trigger that spawns the "waves" as the levels of units is often called. It can be done like this:


Wave 1
Code:
    Events
        Time - Elapsed game time is 30.00 seconds
    Conditions
        None
    Actions
        Unit - Create 40 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees
In the above trigger it will spawn 40 Footmen instantly, if you do not want this to happen but want them spawning 1 at a time you can do it like this:


Wave 1
Code:
    Events
        Time - Elapsed game time is 30.00 seconds
    Conditions
        None
    Actions
        Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees
        Wait 1.00 seconds
        Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees
        Wait 1.00 seconds
        Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees
        Wait 1.00 seconds
        Unit - Create 1 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees
etc...


Right, so the regions and spawning is made, now what's next?

Next on the list should be finding out what to make of builders, towers and making the creeps, this is done within the Object Editor which is located inbetwen the Sound Editor and the Campaign Editor. You can also make triggered abilities for the towers but if you need help from this tutorial I suggest you wait with that untill a later time.


Right-o, I have made some towers, a builder and all the creeps, now what?

Adding the "lives" function is something that almost every TD has, atleast it is only a few which does not, so that is also included in here. Now I will show how you create the basic Leaderboard and putting in the lives function. Before you make the actual Leaderboard you have to make a variable like this one shown below to set the lives initial value.


[Only registered and activated users can see links. ]


Now when that is done you can move on to creating the Leaderboard and setting up everything that has to with lives and updating the Leaderboard.


Note: The below triggers is for a Solo TD life system and is only setted up for Player 1 (Red).

Setup Leaderboard
Code:
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
        None
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Lives
        Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Lives and value Lives
        Leaderboard - Change the color of all labels for (Last created leaderboard) to (0.00%, 100.00%, 0.00%) with 0.00% transparency
        Leaderboard - Show (Last created leaderboard)

Life Lost
Code:
    Events
        Unit - A unit enters End Region
    Conditions
        (Owner of (Entering unit)) Equal to Player 12 (Brown)
    Actions
        Set Lives = (Lives - 1)
        Unit - Remove (Entering unit) from the game   
        Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Lives
        Game - Display to Lives the text: (( + ((Name of (Entering unit)) +  has reached the end! )) + ((String(Lives)) + chances left))
        Trigger - Run Defeat (checking conditions)

Defeat Trigger
Code:
    Events
        None (it is a trigger that is run by the 'Life Lost' trigger)
    Conditions
        Lives Less than or equal to 0
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 1 (Red)) and do (Unit - Remove (Picked unit) from the game)
        Game - Defeat Player 1 (Red) with the message: Defeat!

Leaderboard made, is there anything more?

Most TD maps (atleast the decent ones) has it so you are able to sell your towers so here I will show a way it can be done.


Tower Selling
Code:
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Sell Tower 
    Actions
        Player - Add ((Point-value of (Casting unit)) / xxx) to (Owner of (Casting unit)) Current gold
        Unit - Remove (Casting unit) from the game

Ability done, what's next?

Once you have succesfully made the Tower Selling ability I think you are covered in with the basic triggers, now you only need to make it so you win once last wave of units have been defeated. Good luck with your TD map!
Tutorial Tools

Featured Tutorials
 
By Oninuva on 04-26-2007, 07:31 AM
Nice +rep. The screen shot with the ice looked cool xD
Reply With Quote
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
By ragingspeedhorn on 04-29-2007, 12:06 PM
Thanks, glad you like it, this is my oldest tutorial, it is almost 2½ years old I think
Reply With Quote
  #2 (permalink)  
By Brfernan on 06-04-2007, 08:57 PM
nice thanks!!
Reply With Quote
  #3 (permalink)  
By MaxeEvid on 06-06-2007, 02:02 PM
raginspeed, congrats for this good tutorial, nice to see you helping other people
Reply With Quote
  #4 (permalink)  
By ragingspeedhorn on 07-29-2007, 08:35 PM
No problem, glad you like the tutorial.
Reply With Quote
  #5 (permalink)  
By isake on 10-24-2007, 12:13 PM
hey please help me with the tutorial i cant make it work! please answer as soon its possible
Reply With Quote
  #6 (permalink)  
By Oninuva on 10-25-2007, 08:58 PM
Which part do you need help with?
Reply With Quote
  #7 (permalink)  
By Zarcius on 12-06-2007, 08:08 PM
Awesome. Simply Awesome.

this will help alot +Rep
Reply With Quote
  #8 (permalink)  
By ghostmaster511 on 02-01-2008, 07:23 PM
cant see live variable

hey whats the varible for lives* i get the red X and i click show picture but it doesnt show it
Last edited by ghostmaster511; 02-04-2008 at 07:35 AM.
Reply With Quote
Comment

Bookmarks

LinkBacks (?)
LinkBack to this Thread: http://www.gamerz-forum.com/forum/tutorials/tutorial-basics-td-1080.html
Posted By For Type Date
Gamerz-Forum.com This thread Refback 02-04-2008 10:36 PM


Currently Active Users Viewing This Tutorial: 1 (0 members and 1 guests)
 
Tutorial Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 12:25 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.1 ©2007, Crawlability, Inc.
Template-Modifikationen durch TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios