wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Tutorials for beginners
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-09-2006, 01:48 PM   #1
ragingspeedhorn
I MUST BREAK YOU
 
ragingspeedhorn's Avatar


Official Map Reviewer
 
Join Date: May 2005
Posts: 1,237

Submissions (10)

ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)

Approved Map: Dodge The Wisp Wheels

Send a message via MSN to ragingspeedhorn
Default Basics of a TD

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: http://www.wc3campaigns.net/showthread.php?t=80072

Movement Region 1

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


Movement Region 2

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


Movement Region 3

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


Movement Region 4

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


Movement Region 5

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


Zoom (requires log in)

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

Trigger:
Collapse Events
Time - Elapsed game time is 30.00 seconds
Collapse Conditions
None
Collapse 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

Trigger:
Collapse Events
Time - Elapsed game time is 30.00 seconds
Collapse Conditions
None
Collapse 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.


Zoom (requires log in)


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

Trigger:
Collapse Events
Time - Elapsed game time is 0.10 seconds
Collapse Conditions
None
Collapse 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

Trigger:
Collapse Events
Unit - A unit enters End Region
Collapse Conditions
(Owner of (Entering unit)) Equal to Player 12 (Brown)
Collapse 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

Trigger:
Collapse Events
None (it is a trigger that is run by the 'Life Lost' trigger)
Collapse Conditions
Lives Less than or equal to 0
Collapse 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

Trigger:
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Sell Tower
Collapse 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! :)
Attached Images
File Type: jpg pathing3gp.jpg (261.7 KB, 331 views)
File Type: jpg lives8vi.jpg (16.3 KB, 301 views)
__________________
ragingspeedhorn is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-11-2006, 08:13 AM   #2
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (952)olofmoleman has a brilliant future (952)olofmoleman has a brilliant future (952)olofmoleman has a brilliant future (952)olofmoleman has a brilliant future (952)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

The pictures don't show.
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 06-11-2006, 08:17 AM   #3
FinalTyrant
Intense™
 
FinalTyrant's Avatar
 
Join Date: Jun 2003
Posts: 1,730

Submissions (2)

FinalTyrant will become famous soon enough (66)FinalTyrant will become famous soon enough (66)FinalTyrant will become famous soon enough (66)

Default

The way you're spawning units would cause memory leaks, maybe you should include an example that doesn't leak.
FinalTyrant is offline   Reply With Quote
Old 06-11-2006, 11:35 AM   #4
Archian
Dark & Ominous
 
Archian's Avatar


Project Leader: LoC
 
Join Date: Apr 2006
Posts: 1,459

Submissions (27)

Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)

Default

there are still something missing which i think should be included, like countdown timers and variables which sets up the creep waves, even though it's the basics, Cause useing 'Time Elapsed' will not wait until a wave is defeated, players might battle 2 - 3 waves at the same time (depending of the difficulty).

anyway good tutorial ;)
Archian is offline   Reply With Quote
Old 06-11-2006, 12:28 PM   #5
ragingspeedhorn
I MUST BREAK YOU
 
ragingspeedhorn's Avatar


Official Map Reviewer
 
Join Date: May 2005
Posts: 1,237

Submissions (10)

ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)

Approved Map: Dodge The Wisp Wheels

Send a message via MSN to ragingspeedhorn
Default

Quote:
Originally Posted by FinalTyrant
The way you're spawning units would cause memory leaks, maybe you should include an example that doesn't leak.

This is something most TD maps does, usually it makes no difference. I also gave a link to emljr3's tutorial on how to deal with leaks so if people really want their td not to leak that small bit they can read up on how to fix it.

@Olof - The pictures show here.
__________________
ragingspeedhorn is offline   Reply With Quote
Old 06-11-2006, 12:38 PM   #6
GaDDeN
Map Dev *********
 
GaDDeN's Avatar


Respected User
 
Join Date: Feb 2004
Posts: 788

Submissions (3)

GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)

Approved Map: EliminationApproved Map: Stand of the PeonsApproved Map: Elimination Tournament

Default

That is deffinately NOT the way most TDs spawn creeps. The basic way to create a TD creep spawning trigger is having one trigger to set the waves types (if level equals 1 set CreepType = Footman) and then another trigger that spawns x CreepType at each spawn when each level begins.

An alternate way is setting all creep types on map init (set CreepType[1] = Footman, set CreepType[2] = Rifleman etc.) and then spawning CreepType[level] everytime the level starts.

And i really think you should include anti leak actions, a spawning trigger with leaks just doesnt work well.
GaDDeN is offline   Reply With Quote
Old 06-11-2006, 01:07 PM   #7
ragingspeedhorn
I MUST BREAK YOU
 
ragingspeedhorn's Avatar


Official Map Reviewer
 
Join Date: May 2005
Posts: 1,237

Submissions (10)

ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)ragingspeedhorn is a jewel in the rough (211)

Approved Map: Dodge The Wisp Wheels

Send a message via MSN to ragingspeedhorn
Default

Fine I will update the tutorial with a better way of spawning creeps but if people want to fix leaks they still need to read another tutorial as I have actually never made a TD and leak fixing is not one of my strong sides.
__________________
ragingspeedhorn is offline   Reply With Quote
Old 06-11-2006, 01:10 PM   #8
Archian
Dark & Ominous
 
Archian's Avatar


Project Leader: LoC
 
Join Date: Apr 2006
Posts: 1,459

Submissions (27)

Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)Archian is a glorious beacon of light (477)

Default

Quote:
Originally Posted by GaDDeN
That is deffinately NOT the way most TDs spawn creeps. The basic way to create a TD creep spawning trigger is having one trigger to set the waves types (if level equals 1 set CreepType = Footman) and then another trigger that spawns x CreepType at each spawn when each level begins.

An alternate way is setting all creep types on map init (set CreepType[1] = Footman, set CreepType[2] = Rifleman etc.) and then spawning CreepType[level] everytime the level starts.

And i really think you should include anti leak actions, a spawning trigger with leaks just doesnt work well.

yes you should do that, like i said :P

Quote:
there are still something missing which i think should be included, like countdown timers and variables which sets up the creep waves, even though it's the basics, Cause useing 'Time Elapsed' will not wait until a wave is defeated, players might battle 2 - 3 waves at the same time (depending of the difficulty).

anyway yes please update the tutorial, it'll be easier for people to make a TD that way ;D

Last edited by Archian : 06-11-2006 at 01:11 PM.
Archian is offline   Reply With Quote
Old 06-11-2006, 06:18 PM   #9
GaDDeN
Map Dev *********
 
GaDDeN's Avatar


Respected User
 
Join Date: Feb 2004
Posts: 788

Submissions (3)

GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)GaDDeN has a spectacular aura about (93)

Approved Map: EliminationApproved Map: Stand of the PeonsApproved Map: Elimination Tournament

Default

Well just remove the points when spawning, you could leave the rest :)
GaDDeN is offline   Reply With Quote
Old 02-11-2008, 03:37 PM   #10
Jimmarn
User
 
Join Date: Feb 2008
Posts: 4

Jimmarn has little to show at this moment (0)

Default

Wow, thanks's helped me alot!
Jimmarn is offline   Reply With Quote
Old 01-19-2010, 01:44 PM   #12
Reme
User
 
Join Date: Jan 2010
Posts: 1

Reme has little to show at this moment (0)

Send a message via MSN to Reme
Default

I think of doing a Circle TD but if i want the to run in the circle i guess i shouldn't add any
End Region?
Reme is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:22 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services