• 🏆 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!

How to spawn creps?

Status
Not open for further replies.
Level 1
Joined
Jul 4, 2009
Messages
3
y know in dota in the woods theres creeps that spawns. when they get killed then they respawn in like 1 min ore something how do i do this? cuz when i do a map the when i place the creeps they never spawn again. plz help :cute:
 
Level 31
Joined
Apr 17, 2009
Messages
3,571
First you should learn a bit about triggering.
It's not useful, if we tell you, which trigger you need, if you never heard about triggers before. Look at some tutorials here.

But here you are:

Event: Unit dies
Condition: Dying Unit is owned by "Creeps (Player12)"
Action: Wait 60 seconds
Create 1 Unit-Type of Dying Unit at "Position of Dying Unit" for Creeps (Player12)
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Here ya go:

  • Spawn Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Before you can (re)create creep, we need to set up a few things --------
      • -------- Put actions below into your Map Initialization trigger --------
      • -------- You will have to create Region variable array --------
      • -------- In this case, I named it Spawn_Region --------
      • -------- Create your regions via Region Pallete on each Creep spot --------
      • -------- When you have done it, we will put em into variable --------
      • Set Spawn_Region[1] = YourRegion1
      • Set Spawn_Region[2] = YourRegion2
      • Set Spawn_Region[3] = YourRegion3
      • -------- And so on... --------
      • -------- It is time to move to the real trigger --------
  • Spawn Execute
    • Events
      • Time - Elapsed game time is 0.00 seconds
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • -------- If you set up events like above, you wont have to place creeps in WE at all --------
      • -------- If you want to manually place creeps, remove first event --------
      • For each (Integer A) from 1 to NumberOfRegions, do (Actions)
        • Loop - Actions
          • -------- We will need a Group variable now to take care of leaks --------
          • -------- I am assuming that owner of creeps is neutral hostile player --------
          • -------- If it isn't you can alter it simply below --------
          • Set TempGroup = (Units in Spawn_Region[(Integer A)] owned by Neutral Hostile)
          • 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
              • -------- Condition used above is integer comparison --------
              • -------- Another point variable will be needed to prevent leaks --------
              • Set TempPoint = (Center of Spawn_Region[(Integer A)])
              • Unit - Create 1 YourCreep for Neutral Hostile at TempPoint facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
          • Custom script: call DestroyGroup(udg_TempGroup)
 
Status
Not open for further replies.
Top