• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Easy TD creep spawn levels

Status
Not open for further replies.
Level 6
Joined
Jan 29, 2010
Messages
213
Hi all I need some help with Tower Defense map levels.I want to make it easy but I can't Do that by my self...:nw: There's some of the triggers It may look like that:
  • level changer
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set Total_Levels = 1
  • creep check
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units owned by Player 12 (Brown))) Equal to 0
            • Then - Actions
              • Set Total_Levels = (Total_Levels + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Total_Levels Equal to 2
        • Then - Actions
          • Trigger - Turn on level 2 <gen>
        • Else - Actions
  • level 1
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Special Effect - Create a special effect at (Center of wstart spawn <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Trigger - Turn off (This trigger)
  • level 2
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Rifleman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Rifleman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Rifleman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Rifleman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Rifleman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Special Effect - Create a special effect at (Center of wstart spawn <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Trigger - Turn off (This trigger)

I need only thing like that: If Total_Levels = 2 than turn on Level2 <gen>, Total_Levels = 3 then turn on Level3 <gen>.
 
Last edited:
It should go like that:
  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Total_Levels = 1
    • Set Units[1] = Footman
    • Set Units[2] = Knight
    • Set Units[3] = Dryad
    • Set Units[4] = Scarab
  • creep check
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of living Units[Total_Levels] units owned by Player 12 (Brown))) Equal to 0
      • Then - Actions
        • Set Total_Levels = (Total_Levels + 1)
      • Else - Actions
  • Trigg
  • Events
    • Time - Every 15.00 seconds of game-time
  • Conditions
  • Actions
    • Set Point1 = (Center of wstart spawn <gen>)
    • Unit - Create 1 Units[Total_Levels] for Player 12 (Brown) at Point1 facing Default building facing degrees
    • Custom script: call RemoveLocation (udg_Point1)
Units[] is a Unit-type variable.
You don't need 4 triggers for each seperate unit-type, that you are going to spawn.
You don't need "Do Nothing" action, system will by default do nothing, if there are no actions added.
"Owner of (Entering unit)" responds to the event "Unit - A unit enters region", not "Unit - A unit dies".
 
Last edited:
Level 6
Joined
Jan 29, 2010
Messages
213
The footmans are spawning all the time. unit I kill one of them. Then it start spawning all time knights unit I kill one of brown units (no matter what kind of unit). then he spawning only dread one more kill - scarab and finally when I kill one more of brown units It stops spawning units at all.
-----------------
I need that he spawn them like this:
  • level 1
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Trigger - Turn off (This trigger)
and when units ownered by brown in all map equal to 0 start spawning knights
(This is just only demonstration how it have to spawn them. Of course your way is much better :)) )
 
Last edited:
Here, I made it for you:
  • Te
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Levels = 1
      • Set Units[1] = Knight
      • Set Units[2] = Frost Wyrm
      • Set Units[3] = Green Dragon Whelp
      • Set Units[4] = Green Dragon
      • Trigger - Turn on Tri <gen>
  • Tri
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Set Point = (Center of Region 000 <gen>)
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Units[Levels] for Neutral Hostile at Point facing Default building facing degrees
          • Unit Group - Add (Last created unit) to TempGroup
      • Special Effect - Create a special effect at Point using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Point)
      • Trigger - Turn off (This trigger)
  • Tre
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Unit Group - Remove (Triggering unit) from TempGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Levels Less than 4
            • Then - Actions
              • Set Levels = (Levels + 1)
            • Else - Actions
          • Trigger - Turn on Tri <gen>
        • Else - Actions
Test Map: In the test map, I call the cheat 'whosyourdaddy' in the Map Initialization and reduced the spawn time from 15.00 to 3.00 seconds, for testing purposes.

View attachment Spawn Triggers.w3x
 
Level 11
Joined
Aug 6, 2009
Messages
697
  • Events
    • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Create 1 Footman for Player 12 (Brown) at (Center of wstart spawn <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Special Effect - Create a special effect at (Center of wstart spawn <gen>) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Trigger - Turn off (This trigger)
Instead of this long trigger try using a loop ex:
  • Events
    • Time - Every 15.00 seconds of game time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 10, do (Actions) (1 to 10 = 10 1 to 15 = 15 so on)
      • Loop - Actions
        • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        • Set UnitSent = (Last created unit)
        • Set UnitSendPoint = (Center of SomeRegion)
        • Unit - Order UnitSent to Move To UnitSendPoint
  • Special Effect - Create a special effect attached to the origin of UnitSent using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdlSet Effects = (Last created special effect)
  • Set Effects = (Last created special effect)
  • Special Effect - Destroy Effects
    • Custom script: call RemoveLocation (udg_UnitSendPoint)
 
Last edited:
Status
Not open for further replies.
Top