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

Creep Respawn System

Status
Not open for further replies.
Hello. I tried to create a Creep Respawn system. And now, I want to know if this system will work 100% through a couple of hours game-play.

Here are the triggers:

  • CreepRespawnInitalization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CreepGroup = (Units owned by Player 12 (Brown))
      • Unit Group - Pick every unit in CreepGroup and do (Actions)
        • Loop - Actions
          • Set CreepID = (CreepID + 1)
          • Set CreepUnitType[CreepID] = (Unit-type of (Picked unit))
          • Set CreepRespawnTimer[CreepID] = 0
          • Set CreepPosition[CreepID] = (Position of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to CreepID
      • Custom script: call DestroyGroup(udg_CreepGroup)

  • CreepDies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
      • ((Triggering unit) is Summoned) Equal to False
    • Actions
      • Set CreepRespawnTimer[(Custom value of (Triggering unit))] = 30

  • CreepRevive
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set CreepGroup = (Units owned by Player 12 (Brown))
      • Unit Group - Pick every unit in CreepGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CreepRespawnTimer[(Custom value of (Picked unit))] Greater than or equal to 1
            • Then - Actions
              • Set CreepRespawnTimer[(Custom value of (Picked unit))] = (CreepRespawnTimer[(Custom value of (Picked unit))] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CreepRespawnTimer[(Custom value of (Picked unit))] Equal to 0
                • Then - Actions
                  • Set CreepRespawnTimer[(Custom value of (Picked unit))] = -5
                  • Unit - Create 1 CreepUnitType[(Custom value of (Picked unit))] for Player 12 (Brown) at CreepPosition[(Custom value of (Picked unit))] facing Default building facing degrees
                • Else - Actions
            • Else - Actions
      • Custom script: call DestroyGroup(udg_CreepGroup)

Well, will this work? :)
 
Status
Not open for further replies.
Top