Can someone help me adapt this spawn trigger?

Astal

New Member
Reaction score
1
I need to change it so when a tower dies, it stops spawning creeps in that region. Im not really sure how to even go about this. Unless when A tower dies would i
Trigger:
  • Set RespawnRegionsCount = 7
and update the Respawn regions so the correct ones still spawn?
Trigger:
  • Revive Creeps Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RespawnRegions[1] = Tower 13 Spawn <gen>
      • Set RespawnRegions[2] = Tower 14 Spawn <gen>
      • Set RespawnRegions[3] = Tower 15 Spawn 1 <gen>
      • Set RespawnRegions[4] = Tower 15 Spawn 2 <gen>
      • Set RespawnRegions[5] = Tower 15 Spawn 3 <gen>
      • Set RespawnRegions[6] = Tower 16 Spawn <gen>
      • Set RespawnRegions[7] = Tower 17 Spawn <gen>
      • Set RespawnRegions[8] = Tower 18 Spawn <gen>
      • Set RespawnRegionsCount = 8
      • Set tmpInteger = 0
      • For each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Player 12 (Brown)) and do (Actions)
            • Loop - Actions
              • Unit - Set the custom value of (Picked unit) to (Integer A)
              • Set tmpInteger = (tmpInteger + 1)


Trigger:
  • Revive Creeps
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (Custom value of (Dying unit)) Greater than 0
    • Actions
      • Wait CreepRespawnTime seconds
      • Set TempPoint = (Random point in RespawnRegions[(Custom value of (Dying unit))])
      • Unit - Create 1 (Random level CreepLevel creep unit-type) for Player 12 (Brown) at TempPoint facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))
      • Custom script: call RemoveLocation (udg_TempPoint)


Trigger:
  • Level Up Creeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in TowersOfSauron) Equal to True
    • Actions
      • Set CreepLevel = (CreepLevel + 1)




Edit: Would somthing like this work?

Trigger:
  • Spawn Shelob
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to Tower of Sauron 0017 <gen>
    • Actions
      • Unit - Create 1 Shelob [Boss] for Player 12 (Brown) at (Center of Shelob Spawn <gen>) facing Default building facing degrees
      • -------- Update Creep Spawns --------
      • Set RespawnRegions[1] = Tower 13 Spawn <gen>
      • Set RespawnRegions[2] = Tower 14 Spawn <gen>
      • Set RespawnRegions[3] = Tower 15 Spawn 1 <gen>
      • Set RespawnRegions[4] = Tower 15 Spawn 2 <gen>
      • Set RespawnRegions[5] = Tower 15 Spawn 3 <gen>
      • Set RespawnRegions[6] = Tower 16 Spawn <gen>
      • Set RespawnRegions[7] = Tower 18 Spawn <gen>
      • Set RespawnRegionsCount = 7
      • Set tmpInteger = 0
      • For each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Player 12 (Brown)) and do (Actions)
            • Loop - Actions
              • Unit - Set the custom value of (Picked unit) to (Integer A)
              • Set tmpInteger = (tmpInteger + 1)
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Perhaps in the Revive Creeps trigger at the conditions you can add:

JASS:
if (Custom value of (Dying unit)) Greater than 0 then
    if (Custom value of (Dying unit)) equals 1) and Tower 13 is alive then run actions
    else if (Custom value of (Dying unit)) equals 2 and Tower 14 is alive then run
actions
    .
    .
    .
    else if (Custom value of (Dying unit)) equals 8 and Tower 18 is alive then run actions



I really don't know how the above will be translated in to GUI but maybe you do.
 

Astal

New Member
Reaction score
1
Perhaps in the Revive Creeps trigger at the conditions you can add:

JASS:
if (Custom value of (Dying unit)) Greater than 0 then
    if (Custom value of (Dying unit)) equals 1) and Tower 13 is alive then run actions
    else if (Custom value of (Dying unit)) equals 2 and Tower 14 is alive then run
actions
    .
    .
    .
    else if (Custom value of (Dying unit)) equals 8 and Tower 18 is alive then run actions



I really don't know how the above will be translated in to GUI but maybe you do.

I really dont wanna tweak it that much, its a trigger from a creep respawn trigger pack I found on the forums. Anyone else able to help?
 

Stringel

New Member
Reaction score
12
Trigger:
  • Spawn Shelob
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to Tower of Sauron 0017 <gen>
    • Actions
      • Unit - Create 1 Shelob [Boss] for Player 12 (Brown) at (Center of Shelob Spawn <gen>) facing Default building facing degrees
      • -------- Update Creep Spawns --------
      • Set RespawnRegions[1] = Tower 13 Spawn <gen>
      • Set RespawnRegions[2] = Tower 14 Spawn <gen>
      • Set RespawnRegions[3] = Tower 15 Spawn 1 <gen>
      • Set RespawnRegions[4] = Tower 15 Spawn 2 <gen>
      • Set RespawnRegions[5] = Tower 15 Spawn 3 <gen>
      • Set RespawnRegions[6] = Tower 16 Spawn <gen>
      • Set RespawnRegions[7] = Tower 18 Spawn <gen>
      • Set RespawnRegionsCount = 7
      • Set tmpInteger = 0
      • For each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Player 12 (Brown)) and do (Actions)
            • Loop - Actions
              • Unit - Set the custom value of (Picked unit) to (Integer A)
              • Set tmpInteger = (tmpInteger + 1)

Not entirely sure what you're after but I'll give it a try:

Trigger:
  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Tower
    • Actions
      • Unit - Create 1 Shelob [Boss] for Player 12 (Brown) at (Center of Shelob Spawn <gen>) facing Default building facing degrees
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Triggering unit)) Equal to RandomRegions[(Integer A)]
            • Then - Actions
              • Set RandomRegions[(Integer A)] = No region
              • Set RespawnRegionsCount = RespawnRegionsCount - 1
            • Else - Actions
      • For each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Player 12 (Brown)) and do (Actions)
            • Loop - Actions
              • Unit - Set the custom value of (Picked unit) to (Integer A)
 

Astal

New Member
Reaction score
1
Not entirely sure what you're after but I'll give it a try:

Trigger:
  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Tower
    • Actions
      • Unit - Create 1 Shelob [Boss] for Player 12 (Brown) at (Center of Shelob Spawn <gen>) facing Default building facing degrees
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Triggering unit)) Equal to RandomRegions[(Integer A)]
            • Then - Actions
              • Set RandomRegions[(Integer A)] = No region
              • Set RespawnRegionsCount = RespawnRegionsCount - 1
            • Else - Actions
      • For each (Integer A) from 1 to RespawnRegionsCount, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)] owned by Player 12 (Brown)) and do (Actions)
            • Loop - Actions
              • Unit - Set the custom value of (Picked unit) to (Integer A)

Actually I just realized I dont want a respawn system. I need a spawn system since I dont want to have to actually place the units first.

Maybe you can help me out if i explain it better.

Im looking to spawn like 5 units of multiple types every X amount of seconds at random areas in the spawn region once a hero enters the spawn region. That way after a tower is killed the next spawn areas creeps will be a harder level and not level 1, like they would be if i placed them in the editor.

I tried the best way i could think of (it was really horrible and it didnt work)

I plan on not using my triggers i posted in the first post at all. I need to start from scratch for this to work right.
 

Astal

New Member
Reaction score
1
Ok never mind there is a need for my statement.

I made these triggers after looking around on the forums but the creeps attack their own tower when they spawn...

Trigger:
  • Trigger Spawning
    • Events
      • Unit - A unit enters Trigger Spawning <gen>
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Trigger: Trigger Sp...
      • Trigger - Turn on Spawn Creeps Tower 13 <gen>
      • Trigger - Turn on Spawn Creeps Tower 14 <gen>
      • Trigger - Turn on Spawn Creeps Tower 15 <gen>
      • Trigger - Turn on Spawn Creeps Tower 16 <gen>
      • Trigger - Turn on Spawn Creeps Tower 17 <gen>
      • Trigger - Turn on Spawn Creeps Tower 18 <gen>
      • Trigger - Turn off (This trigger)


Trigger:
  • Spawn Creeps Tower 13
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
      • (Tower of Sauron 0013 <gen> is alive) Equal to True
    • Actions
      • Game - Display to (All players) the text: Trigger: Trigger Sp...
      • Unit - Create 5 (Random level CreepLevel creep unit-type) for Player 12 (Brown) at (Random point in Tower 13 Spawn <gen>) facing Default building facing degrees


Trigger:
  • Attack Heros
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Monster_Group = (Units owned by Player 12 (Brown))
      • Unit Group - Pick every unit in Monster_Group and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Random unit from Hero_Group))
          • Unit - Order (Picked unit) to Attack-Move To TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)


By the way the building is showing up as neutral passive but it shouldnt be, i have it set the same as the units. To creep and owned by player 12 (sauron)

Ahh ha i think its cause display as neutral hostile wasnt checked
 
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