• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Map Problems

Status
Not open for further replies.
Level 19
Joined
Apr 10, 2010
Messages
2,789
Hey everyone,
Can you help me in my map (its a TD)? It has many problems like when the first wave comes theres only one timer saying how many seconds to the first wave then when it goes to the next it becomes two, and in the second wave no creeps come out. The map is attached below. Please help.

Thanks in advance.
 

Attachments

  • Body Defence TD v0.10b.w3x
    73.8 KB · Views: 53
Level 12
Joined
Apr 15, 2008
Messages
1,063
You use repeating timers where you should use one-shot.
The trigger "Continuous timer" get lauched every second. It destroys the window and then waits until all units are dead. By the time they all get destroyed, you have this trigger launched and waiting like 40-60 times.
Also, you have serious memory leaks there, check some tutorial on that
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
alright, well once you set a timer to a certain time you must create a whole other timer to make a different time. so thats why your timer doesnt go to ten seconds.

on a side note, you can really cut down on map size if this is only going to be 3 player. but i think you could make this into a 12 player game with teams of 3. thatd be sweet.:)

if you need help removing those leaks, you can always ask me and ill remove a few so you can see how. :thumbs_up:
 
Level 19
Joined
Apr 10, 2010
Messages
2,789
on a side note, you can really cut down on map size if this is only going to be 3 player. but i think you could make this into a 12 player game with teams of 3. thatd be sweet.:)

if you need help removing those leaks, you can always ask me and ill remove a few so you can see how. :thumbs_up:

I cant make it a 12 player game, cuz one are for the viruses and one for the body, so only 10 player or 9 if in teams of three. And if you can help me its fine, id appreciate it. :thumbs_up:
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
What you also should do, and it will spare you much work, is to use a single trigger for spawn, not one for each wave.
What you need is to simply create a unit type array, fill it with the unit types for each wave, and then use the array to choose which unit type to spawn.
  • Wave X
    • Events
      • Time - WaveTimerOrWhateverItsCalled expires
    • Actions
      • Set Wave = Wave + 1
      • Unit - Create 6 (UnitTypeArray[Wave]) for (Neutral victim) at (SpawnPoint)
      • Game - Display "Something nice" for all players
      • ...
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
You use just this one trigger instead of the 20 triggers you use to spawn. The thing is, all of your spawn triggers do exactly the same, only the unit type of spawned units is different. So if you used unit type variable, you could use the same trigger over and over, but each time it could spawn different units.

My point is, these two triggers:
  • Spawn 1
    • Events
      • Time - timer expires
    • Actions
      • Unit - Create 5 Footman for (Player 10) at (center of smthning)
  • Spawn 2
    • Events
      • Time - timer expires
    • Actions
      • Unit - Create 5 Knight for (Player 10) at (center of smthning)
Can be generalized into a single trigger

  • Spawn general
    • Events
      • Time - timer expires
    • Actions
      • Unit - Create 5 UnitsToSpawn for (Player 10) at (center of smthning)
Where UnitsToSpawn is a variable. If you used an array UnitsToSpawn[wave], it will automatically spawn units that belong to the wave. Just set it up in initialization:
  • Init
    • Events
      • Map Initialization
    • Actions
      • Set UnitsToSpawn[1] = Virus
      • Set UnitsToSpawn[2] = Virus Beast
      • ....
      • Set UnitsToSpawn[20] = Virus Boss
Now the spawn trigger will spawn UnitsToSpawn[1](Virus) in first wave, UnitsToSpawn[2](Virus Beast) in second and so on...

I noticed you used the spawn triggers from a tutorial (Multiple Creep Spawn system), which also includes a general trigger, just like I posted (however that tutorial is very bad).
 
Level 6
Joined
Oct 10, 2009
Messages
1,425
sorry, just realized this got other posts :X

MORT said:
I don't believe that is true, you can start the same timer again, with different time.
well i have read about it and other people said it would not work. but I've never actually tried it nor had any reason too, so I'll take your word for it xD

Blindman said:
if you can help me its fine, id appreciate it.
well just PM the map when youre done and ill remove the leaks in probably 10-20 minutes depending on how many triggers.
 
Status
Not open for further replies.
Top