• 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.

Need help with spawn system!

Status
Not open for further replies.
Level 12
Joined
Mar 30, 2013
Messages
664
! Here !

  • Spawning
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set tempPoint = (Center of EVIL SPAWN 1 <gen>)
      • Unit - Create 2 Commandre for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
      • Set tempPoint = (Center of EVIL SPAWN 2 <gen>)
      • Unit - Create 2 Dullahan for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
      • Set tempPoint = (Center of EVIL SPAWN 3 <gen>)
      • Unit - Create 2 Demon Beast Rider for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)

  • Attacking
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Unit Group - Pick every unit in UnitSpawnGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Not equal to (Order(stop))
            • Then - Actions
              • Set tempPoint = (Position of (Random unit from tempGroup))
              • Unit - Order (Picked unit) to Attack (Random unit from tempGroup)
              • Custom script: call RemoveLocation( udg_tempPoint)
              • Custom script: set udg_tempPoint = null
            • Else - Actions
              • Custom script: call DestroyGroup( udg_tempGroup)
              • Custom script: set udg_tempPoint = null

Here you got the triggers :fp::goblin_boom:
 
Level 12
Joined
Mar 30, 2013
Messages
664
  • Spawning
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set tempPoint = (Center of EVIL SPAWN 1 <gen>)
      • Unit - Create 1 Legionare for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Unit - Create 1 Commandre for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
      • Set tempPoint = (Center of EVIL SPAWN 2 <gen>)
      • Unit - Create 1 Dimension Magican for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Unit - Create 1 Demon Hound for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)
      • Custom script: set udg_tempPoint = null
      • Set tempPoint = (Center of EVIL SPAWN 3 <gen>)
      • Unit - Create 1 Demon Beast Rider for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Unit - Create 1 Infernal Knight for Player 1 (Red) at tempPoint facing 0.00 degrees
      • Unit Group - Add (Last created unit) to UnitSpawnGroup
      • Custom script: call RemoveLocation( udg_tempPoint)


  • Attacking
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Unit Group - Pick every unit in UnitSpawnGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Not equal to (Order(stop))
            • Then - Actions
              • Set tempPoint = (Position of (Random unit from tempGroup))
              • Unit - Order (Picked unit) to Attack (Random unit from tempGroup)
              • Custom script: call RemoveLocation( udg_tempPoint)
              • Custom script: set udg_tempPoint = null
            • Else - Actions
              • Custom script: call DestroyGroup( udg_tempGroup)
              • Custom script: set udg_tempPoint = null



This dont work!!!!!!!: :fp::goblin_boom:
 
change this in ur bottom trigger
  • Set tempPoint = (Position of (Random unit from tempGroup))
  • Unit - Order (Picked unit) to Attack (Random unit from tempGroup)
  • Custom script: call RemoveLocation( udg_tempPoint)
  • Custom script: set udg_tempPoint = null
to this
  • Unit - Order (Picked unit) to Attack (Random unit from tempGroup)
null tempPoint in ur first trigger only at the end of the trigger.

change this
  • (Issued order) Not equal to (Order(stop))
to this
  • (Current order of (Picked unit)) Equal to (Order(stop))
 
Level 12
Joined
Mar 30, 2013
Messages
664
  • Attacking
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Player 1 (Red)))
      • Unit Group - Pick every unit in UnitSpawnGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(stop))
            • Then - Actions
              • Unit - Order (Picked unit) to Attack (Random unit from tempGroup)
            • Else - Actions
      • Custom script: call DestroyGroup( udg_tempGroup)
      • Custom script: set udg_tempPoint = null
 
Status
Not open for further replies.
Top