The Ultimate Newbies Guide to TDs

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Since so many people seem to be wanting to make TDs heres a list of basic TD stuff.

Creating A Dialog

You will need to make a couple of variables. Here are the ones we will be using for our example.

Name: EasyDiff
Type: Dialog Button
Initial Value: -None-

Name: MediumDiff
Type: Dialog Button
Initial Value: -None-

Name: HardDiff
Type: Dialog Button
Initial Value: -None-

Name: Lives
Type: Integer
Initial Value: 0

Name: DiffChooser
Type: Dialog
Initial Value: Default

Next you will need to execute a trigger to set-up the Dialog

Events
Map Initilization

Coniditions
Player Slot Status Comparison- Player 1(Red) Slot Status Equal To Is Playing
( ^ Completely Optional)

Actions
Dialog-Create Dialog Button- Create a dialog button for DiffChooser Labeled Easy
Set Variable - Set EasyDiff to (Last Created Dialog Button)
Dialog-Create Dialog Button-Create a dialog button for DiffChooser Labeled Medium
Set Variable - Set MediumDiff to (Last Created Dialog Button)
Dialog-Create Dialog Button-Create a dialog button for DiffChooser Labeled Hard
Set Variable - Set HardDiff to (Last Created Dialog Button)
Dialog-Show/Hide- Show DiffChooser for Player1(Red)

Here is how you set lives after a button is clicked. Let's say Easy is 40 lives. Use this trigger.

Events
Dialog-Dialog Button Click- A dialog button is clicked for DiffChooser

Conditions
Dialog Button Comparison- (Clicked Dialog Button) Is Equal To EasyDiff

Actions
Set Variable- Set Lives to 40
Dialog- Show/Hide- Hide DiffChooser for Player1(red)

Use that same trigger for different difficulties, substituting the number of lives corresponding to how many you wish to have for that difficulty.

Creating Units and Having Them Move

This is essential for any TD. This is how you will get your units to move. You will need to create a couple regions. Here are ours, for this example.

'Spawn1'
'Move1'
'Move2'
'Lives'

You also need to create a timer, and set it.
Correspondeing to the above trigger, a good way to do this is, after the lives are set, add

Trigger-Run (Checking Conditions) Enemy Spawn 1

Then you must create a couple variables. Here are ours for the example.

Name: LvlTimer
Type: Timer
Initial Value: -None-

Name: MonsterType
Type: Unit-Type
Initial Value: -None-

Name: MonsterAmount
Type: Integer
Initial Value: -None-

Name: LvlNumber
Type: Integer
Initial Value: 1

Now we must set our timer. Here is our basic trigger to do that. We can set a couple of actions, but I usually leave this trigger as named 'Beggening Timer' and have it run using the previous dialog triggers. This will be done as such.

Events
None

Coniditions
None

Actions
Countdown Timer- Set LvlTimer as a Repeating timer that will expire in 45.00 seconds
Game-Text Message (Explicitly Timed)- Display to (All Players) for 20.00 seconds the text: 1st level will start in 45 seconds

Now we need to actually start the levels, there are a couple of things we need to do. First we need to set all the levels. This trigger is set to 'Initially Off', which means you need to uncheck the box that says intially on. This can be done as follows. There will be no actions or conditions, as you will find out a little later in this section of our lesson, we will call on this trigger using another trigger. I will be using just fake units. anything inside the trigger in Italics is a fake name, and can be replaced with whatever you choose. Ok, here it is:

Events
None

Coniditions
None

Actions
If/Then/Else- If LvlNumber Is Equal To 1, Then Set Variable(Set MonsterType = Scouts), Else (Do Nothing)
If/Then/Else-If LvlNumber Is Equal To 1, Then Set Variable(Set MonsterAmount = 30), Else (Do Nothing)

What you then do is repeat that trigger above, replacing the LvlNumber by one each time and replacing MonsterType. MonsterAmount is fine, unless you are doing bosses or something, and wish to change it.

Before we get the units moving, we need to set move triggers.

Events
Unit-Unit Enters Region-Unit Enters Enemy Spawn 1

Conditions
Player Comparison- (Owner Of (Entering Unit) Equal To Player 12

Actions
Unit-Issue Order Targetting A Point-Order (Event Response-Entering region) to Move To (Center Of (Move 1))

Now, you need to copy + paste that trigger, and change 'Enemy Spawn 1' and 'Move 1' To 'Move 1' and 'Move 2' (Or whatever your next move is.

Next we need to show what to do after the timer runs out.

Events
Time- Timer Expires- LvlTimer expires.

Coniditions
None

Actions
Countdown Timer- Pause Timer- Pause (Event Response-Expiring Timer)
Trigger- Run (Checking Conditions)-Run Set Levels Our previous trigger where we set all the levels
Unit-Create Units Facing Angle- Create MonsterAmount MonsterType at (Center Of(Enemy Spawn 1) facing Default Building Facing Degrees
Unit Group- Pick Every Unit In Unit Group And Do Action- Pick Every Unit In (Units In (Enemy Spawn 1)) And do Unit Group- Issue Order Targetting A Point-Order (Units In (Enemy Spawn 1)) to Move To (Center Of (Move 1))
Game-Text Message (explicitly Timed)-Display to (All Players) for 20.00 seconds the message: Level 1- Scouts
Set Variable- Set LvlNumber = (Aritchmetic- LvlNumber+1)

Next we need to reset the timer.

Events
Player-Properties- Player 12's Food Used Becomes Less Than or Equal To 0.00

Conditions
None

Actions
Countdown Timer- Set LvlTimer As A Repeating Timer set to expire in 30.00 seconds.

Finally we need to set the losing a lives trigger.

Events
Unit-Unit Enters Region-A Unit Enters Lives

Conidtions
Player Comparison-Owner of (Entering Unit) Equal To Player 12

Actions
Set Variable- Set Lives = (Lives - 1)

Here is the final losing trigger.

Events
None

Coniditions
None

Actions
If/Then/Else- If (Integer Comparison-LvlNumber Equal To 0) Then (Game-Defeat-Defeat Player 1(Red) With message You lose!), Else (Do Nothing)

Copy + Paste that trigger and substitute Player 1(Red) with all your defenders.

Setting Up A Leaderboard

Ok, phew, now that we have moving triggers out of the way, lets move onto Leaderboards. Yes, those fancy leaderboards. Here is how you make them.

Events
Map Initilization

Conditions
None

Actions\
Leaderboard-Create-Creat a leaderboard for (All Players) titled Kills.
If/Then/Else- If (Player Slot Status Comparison- Player 1 (Red) Slot Status Equal To Is Playing) Then (Leaderboard- Add Player-Add Player 1(Red) to (Last Created Leaderboard) with label 'Name Of Player 1(Red)' and value of 0, Else (Do Nothing)

You need to copy + paste the 'If/Then/Else' trigger and subsitute Player 1 with player 2, Player 3, Player 4, and so on.

Here is how u add kills to your leaderboard. A bit complicated but not too hard to figure out.

You need to add a variable though.

Name: Kills
Type: Integer Array
Initial Value: 0

Events
Unit-Unit Dies- A unit owned by Player 12 dies

Conditions
Integer Comparison- Lives Is Not Equal To 0

Actions
Set Kills[Player Number Of(Owner of Killing Unit)))] = Kills[Player Number of(Oner of Killing Unit)))] + 1
Leaderboard- Change the value for (Owner of(Killing Unit)) in (Last Created Leaderboard) to Kills[Player Number Of(Owner Of(Killing Unit)))]
Leaderboard-Sort-Sort (Last Created Leaderboard) By Value In Descending Order

If a player leaves this is the trigger you need to run.

Events
Time-Periodic Event- Every 5.00 seconds of game time

Conditions
None

Actions
If/Then/Else- If (Player Slot Status Comparison Player 1(Red) Slot Status Equal To Has Left The Game), Then (Leaderboard-Change Player Label- Change the lable for Player 1(Red) in (Last Created Leaderboard) to <Quit the game>), Else (Do Nothing)

Once again, like you have done so many times before, you must copy + paste and make this for each human player.

Well, thats about all the basics you'll need to know. If you wish to know anything else, then let me know and I'll edit this post with how to do it.

-Frank :cool:
 

benjamin

Member!
Joined
Jan 6, 2003
Messages
68
Reaction score
0
Website
Visit site
how can u do this?:

Name: DiffChooser
Type: Dialog
Initial Value: -None-

i mean you cant choose "-none-". only "new dialog (default)"
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
By -None- I mean default, I'm sorry I forgot to clarify that.

-Frank :cool:
 

UltimateJim

Member!
Joined
Jun 9, 2003
Messages
1,406
Reaction score
0
Location
in my house, durr Post
yes "frank's" tutorial is what say... zoatar used, its quite easy unless your a :nooob and if your a :nooob you should be


did your really type that up frank?
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Yea Jim, it took me about 30 minutes to type lol, I put the triggers exaclty so it would be easy such as instead of putting

Unit-Unit owned by player 12dies, I put Unit-Player Owned Unit Event-A unit Owned By Player 12 dies

Something like that. Thanks for the comment Jim.

-Frank :cool:
 

benjamin

Member!
Joined
Jan 6, 2003
Messages
68
Reaction score
0
Website
Visit site
you say i shall do:

Events
None

Coniditions
None

Actions
If/Then/Else- If LvlNumber Is Equal To 1, Then Set Variable(Set MonsterType = Scouts) and Set Variable(Set MonsterAmount = 30), Else (Do Nothing)

but how can i (Set MonsterType = Scouts) and Set Variable(Set MonsterAmount = 30) )

can you please tell me exacly how?
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Sorry, I've edited that part

-Frank :cool:
 

Horse_Balls

Member!
Joined
Jul 21, 2003
Messages
166
Reaction score
1
Website
Visit site
IceDevil, awesome tutorial! I'm not planning on making a TD at the moment but I feel that if you provided a very basic map with all the triggers it might be easier for someone to follow the tutorial.

P.S. Not suggesting you make a map just for this thread, just wondering if you already made your own TD you could share here. You already worked hard enough on this thread as it is ;)
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Well yes, I have a TD in Development that sdhould be out soon, need to protect it and add a couple things, but for the most part its done

-Frank :cool:
 

g0dsmonkey

Member!
Joined
Sep 12, 2003
Messages
33
Reaction score
0
Location
England :D
Website
Visit site
hey, self confessed :nooob !! if u still dont understand wat the dilly-o good old IceDevil9 is on about. give us a ding dong if ur on msn messenger : g0dsmonkey@hotmail.com : and i'll run u through it at ur own pace and axplain anything u dont understand.
IceDevil and the otha fantastic peeps on here and other forums taught me, its only fair i pass it on to 'the next generation'.

:butterfly Sorry i never used this emoticon before. i just had to :fwink
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Thanks for the comment monkey, it seems people enjoy this tutorial.

-Frank :cool:
 

jetlee

Member!
Joined
Feb 7, 2003
Messages
167
Reaction score
0
Location
Ohio
Website
www.geocities.com
Does any butterflies in here know how to beat Blizzard's :rollie TD?? Their new one is soooo krazy hard i just wanna :scary !!!!
 

nasher-dk

Member!
Joined
Jun 21, 2003
Messages
28
Reaction score
0
Website
Visit site
Icedevil9 you rock I never tried to make a map by myself I edited some units in other people's maps but that wasent interesting enough so I tried your little TD guide and now I am making maps and triggers getting ideas and trying to figure things out myself and ways to do it instead of taking it from other people's maps.

Thx A lot
NASHER

And BTW if I use the
Unit Group- Issue Order Targetting A Point-Order
and the units are meant to turn somewhere its better to use the Unit - Issue Order Targetting A Point-Order instead
don't know why but when I use the first they keep getting stuck and when I use the other there are no problems.
 

tassadar920

Member!
Joined
May 18, 2003
Messages
2,048
Reaction score
0
Location
My house
Umm for the unit group - issue order targetting a point

It's not reall ythatk it's more:

Unit Group - pick every unit and Issue order targetting a point
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Any mods, this can be un-stuck now, seeing as it hardly gets used.

Besides, there's probably better tutorials out there.

-Frank :cool:
 

MagicalDice

Member
Joined
Feb 19, 2004
Messages
8
Reaction score
0
IceDevil, I like you guide alot but I doesn't cover some of the areas I need. For one for the levels thing the If/Then/Else thing gets sorta stuck. Also I don't know how to make custom units. If you could IM me or Email me and help that would be great. I'll list you in the credits and stuff. If you do have the free time thats good.

Thanks in Advance.
 

NewPosts

New threads

Top