HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

how do u creat units? like in a td

09-08-2003, 01:44 AM#1
Crimsongg137
how do u create units in a certain order like in a tower defence.
09-08-2003, 01:51 AM#2
Zachary_Shadow
Use this map and find out :) Easy to use monster spawn trigger, very well made.
09-08-2003, 01:52 AM#3
Crimsongg137
ok ill check it out but does any1 no how to do it cuz im willin to learn by some1 cuz i really have trouble learnin on my own
09-08-2003, 02:02 AM#4
Zachary_Shadow
Triggers aren't easy, and it takes ALOT of pratice to just get a bit good at it...I'm just starting to learn how to use them, gotten pretty good already, but there is a long way till I'm pro :P

Triggers are Tricky... hhehe, little word play :P
09-08-2003, 02:05 AM#5
Crimsongg137
i no how to use them but im learnin alot of stuff
09-08-2003, 02:08 AM#6
mikedogdude
If you wanna learn triggers the best way is just to mess around with them for a long time.
09-08-2003, 02:11 AM#7
Crimsongg137
thats what ive been doing
09-08-2003, 02:19 AM#8
mikedogdude
And how long have you been messing around with them? It takes more than a few days to learn triggering.
09-08-2003, 02:25 AM#9
Crimsongg137
um i started in june
09-08-2003, 02:31 AM#10
Roland of Gilead
I belive this is the best way to set up level for a TD. It makes it easy to add and Subtract levels add bounty and set other things to them. Even Keep track of level and how many units come out on that level.

Code:
[color=blue]
Setup Enemy Array
    Events
        Map initialization
    Conditions
    Actions
        -------- Level 0 (Warm up Level)  Rather than have a 60
second delay before the monsters come, I have a Warm Up Level
that is stupidly easy. --------
          Set Level = (0)
        Set EnemyType[Level] = Unit Type
        Set EnemyCount[Level] = Amount of Unit
        Set Bounty = Amount of Bounty
        Set Variable = Value
        -------- Level 1 --------
        Set Level = (Level + 1)
        Set EnemyType[Level] = Unit Type
        Set EnemyCount[Level] = Amount of Unit
        Set Bounty = Amount of Bounty
        Set Variable = Value
        -------- Set NumberofLevels Variable - Make sure this stays
at the very bottom for obvious reasons. --------
        Set NumberofLevels = Level
[/color]

To make more then 2 levels just copy and paste everything between Level 0 and Level 1, and set new amounts. Level, EnemyType, EnemyCount, and Bounty are variables.
Level. EnemyCount and Bounty are Integer type and EnemyType is a Unit Type variable.


Code:
[color=blue]
Start
    Events
        Time - Elapsed game time is X.XX seconds
    Conditions
    Actions
        Unit - Create EnemyCount[CurrentLevel] EnemyType
CurrentLevel] for Player at (Center of Region <gen>) facing Default building facing degrees
[/color]

This is the code to make the units start coming and the code following is to keep them coming.

Code:
[color=blue]
Levels Routine
    Events
        Player - Player 10 (Light Blue)'s Food used becomes Less than 1.00
    Conditions
        CurrentLevel Less than NumberofLevels
    Actions
        -------- Wait 5 seconds before starting the round to give the
corpses a chance to fall to the ground. --------
        Wait 5.00 seconds
        -------- Add 1 to the CurrentLevel variable.  The CurrentLevel
variable is used all over the place so we know what level we're
on. --------
        Set CurrentLevel = (CurrentLevel + 1)
        -------- The amount of gold a player gets per kill is
determined right here.  Giving players more gold than they need
ruins the game. --------
        -------- Triggers the start of next round --------
        Trigger - Run Start <gen> (ignoring conditions)
        -------- Announce to all the players what level they are on
and what the name of the monster is they are facing. --------
        Game - Display to (All players controlled by a User player)
the text: (Level  + ((String(CurrentLevel)) + ( of  + ((String
NumberofLevels)) + ( - 10  + ((Name of (Last created unit)) + s
coming your way!))))))

[/color]

If ya have anyproblems with it let me know.

P.S. I saw this method used on one of the Dixels Tower Defense maps so I copied it and added my own special requirements to it. :D

Sorry for such a long reply.
09-08-2003, 02:37 AM#11
Crimsongg137
dam thanks alot but um the archer td is all ready made
09-08-2003, 02:52 AM#12
Zachary_Shadow
The one on the archer td is what most people use nowadays, unless they have made their own. It's easy to edit, and it works perfectly! :)
09-08-2003, 02:59 AM#13
Crimsongg137
well since i kinda finished with this tigger for my map ur probaly all wonderin wut im making no it not a tower defence..
09-08-2003, 05:04 AM#14
EmperorColin
If you need anymore help on triggering, jus ask me. i have the same account name on BNet, so u can talk to me there. I am great at triggering, it just came naturally to me. i have triggered with many other games' editors so i know how to learn them. i will be happy to help you out and even beta test for u. :D
09-08-2003, 11:23 AM#15
Crimsongg137
sure but thanx alot