Creep Respawn trigger not working

Lumograph090

New Member
Reaction score
22
I'm really not sure what the problem is with this trigger I changed the things that I assumed would need to be changed, number of regions, variable amounts, etc. Here is the Trigger and its Variables...

GraveyardCounter - Integer (Integer) = Initial Value 0 (Default)
GraveyardUnits - Unit-Type (unitcode) = Array - Size = 256
GroupEnd - Integer (Integer) = Array - Size 4
GroupStart - Integer (Integer) = Array - Size 4
RespawnGroups - Unit Group = Array - Size 33
RespawnRegions - Rect (rect) = Array - Size = 33
RespawnRegionsCount - Integer (Integer) = Initial Value 0 (Default)
tmpInteger - Integer (Integer) = Initial Value 0 (Default)

First Trigger...

Code:
Respawn Initialization
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Set RespawnRegions[1] = 1 <gen>
        Set RespawnRegions[2] = 2 <gen>
        Set RespawnRegions[3] = 3 <gen>
        Set RespawnRegions[4] = 4 <gen>
        Set RespawnRegions[5] = 5 <gen>
        Set RespawnRegions[6] = 6 <gen>
        Set RespawnRegions[7] = 7 <gen>
        Set RespawnRegions[8] = 8 <gen>
        Set RespawnRegions[9] = 9 <gen>
        Set RespawnRegions[10] = 10 <gen>
        Set RespawnRegions[11] = 11 <gen>
        Set RespawnRegions[12] = 12 <gen>
        Set RespawnRegions[13] = 13 <gen>
        Set RespawnRegions[14] = 14 <gen>
        Set RespawnRegions[15] = 15 <gen>
        Set RespawnRegions[16] = 16 <gen>
        Set RespawnRegions[17] = 17 <gen>
        Set RespawnRegions[18] = 18 <gen>
        Set RespawnRegions[19] = 19 <gen>
        Set RespawnRegions[20] = 20 <gen>
        Set RespawnRegions[21] = 21 <gen>
        Set RespawnRegions[22] = 22 <gen>
        Set RespawnRegions[23] = 23 <gen>
        Set RespawnRegions[24] = 24 <gen>
        Set RespawnRegions[25] = 25 <gen>
        Set RespawnRegions[26] = 26 <gen>
        Set RespawnRegions[27] = 27 <gen>
        Set RespawnRegions[28] = 28 <gen>
        Set RespawnRegions[29] = 29 <gen>
        Set RespawnRegions[30] = 30 <gen>
        Set RespawnRegions[31] = 31 <gen>
        Set RespawnRegions[32] = 32 <gen>
        Set RespawnRegions[33] = 33 <gen>
        Set RespawnRegionsCount = 33
        Set tmpInteger = 1
         Do Multiple ActionsFor each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
            Loop - Actions
                Set GroupStart[(Integer A)] = tmpInteger
                Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Neutral Hostile) and do (Actions)
                    Loop - Actions
                        Unit - Set the custom value of (Picked unit) to (Integer A)
                        Unit Group - Add (Picked unit) to RespawnGroups[(Integer A)]
                        Set GraveyardUnits[tmpInteger] = (Unit-type of (Picked unit))
                        Set tmpInteger = (tmpInteger + 1)
                Set GroupEnd[(Integer A)] = (tmpInteger - 1)

Second Trigger...

Code:
Creep Respawns
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        ((Dying unit) is in RespawnGroups[(Custom value of (Dying unit))]) Equal to (==) True
    Actions
        Set tmpInteger = (Custom value of (Dying unit))
        Unit Group - Remove (Dying unit) from RespawnGroups[tmpInteger]
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (RespawnGroups[tmpInteger] is empty) Equal to (==) True
            Then - Actions
                Wait until (((Units within 2048.00 of (Center of RespawnRegions[tmpInteger]) matching (((Matching unit) belongs to an enemy of Neutral Hostile) Equal to (==) True)) is empty) Equal to (==) True), checking every 20.00 seconds
                 Do Multiple ActionsFor each (Integer A) from GroupStart[tmpInteger] to GroupEnd[tmpInteger], do (Actions)
                    Loop - Actions
                        Unit - Create 1 GraveyardUnits[(Integer A)] for Neutral Hostile at (Random point in RespawnRegions[tmpInteger]) facing (Center of RespawnRegions[tmpInteger])
                        Unit - Set the custom value of (Last created unit) to tmpInteger
                        Unit Group - Add (Last created unit) to RespawnGroups[tmpInteger]
            Else - Actions

I have 33 Rects in my map, all with a multitude of units inside them. I copy and pasted this all exactly from AceHearts creep repsawning tutorial. The only thing I changed was the number of Rects - from 4 to 33 total. Not really sure why it isn't working :( Any would or an explanation of what I did wroung would be awesome!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top