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

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:
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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