HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Endless tower defense levels

08-18-2008, 02:28 AM#1
Wraithwynd
Is there a way to make an 'endless' tower defense system where one has a handful of mobs that the system cycles through, each time raising the HP of each mob?

Currently I am using a combination trigger system with the set up as:

Trigger:
Actions
-------- Level 1 --------
Set Lvl = 1
Set Monster_Type[Lvl] = 1 Bandit
Set Enemy_Count[Lvl] = 15
-------- Level 2 --------
Set Lvl = (Lvl + 1)
Set Monster_Type[Lvl] = 2 Troll
Set Enemy_Count[Lvl] = 19
-------- Level 3 --------
Set Lvl = (Lvl + 1)
Set Monster_Type[Lvl] = 3 Satyr
Set Enemy_Count[Lvl] = 25
-------- Level 4 --------
Set Lvl = (Lvl + 1)
Set Monster_Type[Lvl] = 4 Skeleton
Set Enemy_Count[Lvl] = 1
-------- Level 5 --------
Set Lvl = (Lvl + 1)
Set Monster_Type[Lvl] = 5 Spider
Set Enemy_Count[Lvl] = 17

and the setting up of the next round as:
Trigger:
Next Round
Collapse Events
Time - Every 55.00 seconds of game time
Conditions
Collapse Actions
Set Current_Level = (Current_Level + 1)
Set Gold_per_Level = (Gold_per_Level + 10)
Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player - Add Gold_per_Level to (Picked player) Current gold)
If (X_Team_Game Equal to True) then do (Leaderboard - Change the title of (Last created leaderboard) to (Team Mode - Level + (String(Current_Level)))) else do (Leaderboard - Change the title of (Last created leaderboard) to (Survivor Mode - Level + (String(Current_Level))))
Trigger - Run Spawn Monsters <gen> (ignoring conditions)
Game - Display to (All players) for 10.00 seconds the text: (Level + ((String(Current_Level)) + ( : + (Name of (Last created unit)))))
Countdown Timer - Destroy (Last created timer window)
Countdown Timer - Create a timer window for NextSpawnTimer with title Next spawn in:
Countdown Timer - Start NextSpawnTimer as a One-shot timer that will expire in 55.00 seconds

and the spawns are:

Trigger:
Spawn Monsters
Collapse Events
Time - Spawn_Offset expires
Collapse Conditions
Enemy_Count[Current_Level] Greater than 0
Collapse Actions
Trigger - Run Spawn Monsters Red <gen> (checking conditions)
Set Enemy_Count[Current_Level] = (Enemy_Count[Current_Level] - 1)
Countdown Timer - Start Spawn_Offset as a One-shot timer that will expire in 0.80 seconds

What I want to do is run the same series of creeps, making them stronger and/or adding a few more per each cycle of a type. They are attacking the players' base building, as long as the building is maintained, the game continues, the game is over when the building is destroyed.

I also have limited the number of towers to 50, with 10 upgrades.

Yeah its a long, long game - that is the idea on this one.

any ideas on how to more efficently spawn my creeps?
08-18-2008, 02:50 AM#2
burningice95
Yes, you need something like this in your second trigger

Trigger:
Actions
Set RealLevel = (Execution count of (This trigger))
Set CurrentLevel = (CurrentLevel + 1)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
CurrentLevel Greater than 5
Collapse Then - Actions
Set CurrentLevel = 1
Else - Actions
Unit - Create Enemy_Count[CurrentLevel] (Unit-type of Monster_Type[CurrentLevel]) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit Group - Add (Last created unit) to SpawnedMonsters

Obviously you will need to adjust where the units are created, clean up leaks, ect. At the end, you will have all the units you just spawned in a unit group. You can Pick every (SpawnedMonsters), and add a max HP ability to it, or use some sort of Max HP modifying system to modify it based on RealLevel.

Also, if you want to run this trigger through other triggers replace the first line with RealLevel = RealLevel + 1
08-18-2008, 04:43 AM#3
rulerofiron99
Upgrades will work well for the first 100 levels.
08-18-2008, 05:19 PM#4
Veev
A lot of maps on StarCraft have units with say, 4000 HP. Then when they are spawned, they are set to a percentage. Wave one only has 10% of that hp, wave two 20%, and so on. This might be a viable solution.
08-18-2008, 06:06 PM#5
rulerofiron99
Ah, just remembered: Player Handicap.
08-18-2008, 06:07 PM#6
Anitarf
There are so many better ways to do this in wc3, though. There are tricks with which you can modify max hp to any value; you can read up on that in the warcraft 3 ability guide or check out the unit properties system.
08-19-2008, 12:38 AM#7
DioD
You can set movement speed and health factor of creeps without any systems. This will be enouth for simple TD.
Endless tower defense levels - Wc3C.net