• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger unit spawn and after time kill

Status
Not open for further replies.
Use this:

  • Events
    • Game - The in-game time of day becomes Equal to 21.00
  • Conditions
  • Actions
    • Unit - Create xxx Zombie for Player 1 (Red) at (Random point in (Playable map area)) facing Default building facing degrees
  • Events
    • Game - The in-game time of day becomes Equal to 8.00
  • Conditions
    • ((Matching unit) is alive) Equal to True
    • (Unit-type of (Matching unit)) Equal to Zombie
  • Actions
    • Unit - Kill (Matching unit)
Haven't tested, but it should work
 
and it doesn't work. first point, with your first trigger all the zombies would spawn at the same point of the map, so you better use a loop with "for each integer from 1 to xx do actions" . second trigger: i'm not 100% sure but i doubt it works, as you have no unit to compare the "matching" , best to use is (imo) a unit group with "pick every unit in playable area matching conditions" and then the conditions stated by Revolve. the events are correct
 
I got those triggers:
  • Spawn Zombies
    • Events
      • Game - The in-game time of day becomes Equal to 21.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to [Number], do (Actions)
        • Loop - Actions
          • Set TempLoc = (Random point in (Playable map area))
          • Unit - Create 1 Zombie for [Player] at TempLoc facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempLoc)
  • Kill Zombies
    • Events
      • Game - The in-game time of day becomes Equal to 8.00
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Zombie))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_TempGroup)
I think those are leakless and should work for you :)
 
Status
Not open for further replies.
Back
Top