Warchasers Monster Spawning...

AaronPwner

Member
Reaction score
0
I copy/pasted it into my map (I know that is "wrong" but I already made my own trigger which works the same, but this one is better.), however, it is not working. I re-created all the required variables and regions, selected the unit-types and spawn locations...

Help?

Trigger:
  • Initialize Monster Spawners
    • Events
    • Conditions
    • Actions
      • Set NumSpawners = 2
      • -------- Redone Spawning system array based --------
      • -------- Note that 'frequency' controls how often the monster spawns. --------
      • -------- 1 frequency is 0.5 seconds. 4 frequency is 2 seconds. 8 frequency is 4 seconds --------
      • -------- By default it is 4 (2 seconds) --------
      • For each (Integer A) from 0 to NumSpawners, do (Set Frequencies[(Integer A)] = 8)
      • For each (Integer A) from 0 to NumSpawners, do (Set MaxMonsters[(Integer A)] = 7)
      • For each (Integer A) from 0 to NumSpawners, do (Set EnableSpawners[(Integer A)] = True)
      • Set MonsterSpawners[0] = Spirit Portal 0027 <gen>
      • Set SpawnTypes[0] = Lesser Dark Minion
      • Set EnableSpawners[0] = False
      • Set MonsterSpawners[1] = Spirit Portal 0032 <gen>
      • Set SpawnTypes[1] = Lesser Dark Minion
      • Set EnableSpawners[1] = False
      • Set MonsterSpawners[2] = Spirit Portal 0031 <gen>
      • Set SpawnTypes[2] = Lesser Dark Minion
      • Set EnableSpawners[2] = False
      • -------- Set initial frequencies --------
      • For each (Integer A) from 0 to NumSpawners, do (Set InitialFrequencies[(Integer A)] = Frequencies[(Integer A)])
      • Trigger - Run Initialise Monster Groups <gen> (ignoring conditions)
      • Trigger - Turn on Monster Spawn Sweep <gen>
      • Trigger - Turn on Monster Spawn Death <gen>


Trigger:
  • Enable Spawn Set 1
    • Events
      • Unit - A unit enters StartMonsterSpawnersSet1 <gen>
    • Conditions
      • ((Owner of (Entering unit)) is in Playersgroup) Equal to True
    • Actions
      • Set EnableSpawners[0] = True
      • Set EnableSpawners[1] = True
      • Set EnableSpawners[2] = True


Trigger:
  • Initialise Monster Groups
    • Events
    • Conditions
    • Actions
      • -------- I only trust 'set variable' to initialise an Array type --------
      • For each (Integer A) from 0 to NumSpawners, do (Trigger - Run Set Up One Monster Group <gen> (ignoring conditions))


Trigger:
  • Set Up One Monster Group
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 SpawnTypes[(Integer A)] for Player 12 (Brown) at (Position of MonsterSpawners[(Integer A)]) facing Default building facing degrees
      • Set MonsterGroups[(Integer A)] = (Last created unit group)


Trigger:
  • Monster Spawn Sweep
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 0 to NumSpawners, do (If (((MonsterSpawners[(Integer A)] is alive) Equal to True) and ((Number of units in MonsterGroups[(Integer A)]) Less than MaxMonsters[(Integer A)])) then do (Trigger - Run Spawn One Monster <gen> (ignoring conditions)) else do (Do nothing))


Trigger:
  • Monster Spawn Death
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
    • Actions
      • For each (Integer A) from 0 to NumSpawners, do (If (((Dying unit) is in MonsterGroups[(Integer A)]) Equal to True) then do (Unit Group - Remove (Dying unit) from MonsterGroups[(Integer A)]) else do (Do nothing))


Trigger:
  • Spawn One Monster
    • Events
    • Conditions
    • Actions
      • -------- Addition for turning them on and off --------
      • If (EnableSpawners[(Integer A)] Equal to False) then do (Skip remaining actions) else do (Do nothing)
      • -------- I spawn one monster every time 'frequency' gets to zero --------
      • Set Frequencies[(Integer A)] = (Frequencies[(Integer A)] - 1)
      • If (Frequencies[(Integer A)] Not equal to 0) then do (Skip remaining actions) else do (Do nothing)
      • -------- I restore the frequency --------
      • Set Frequencies[(Integer A)] = InitialFrequencies[(Integer A)]
      • Unit - Create 1 SpawnTypes[(Integer A)] for Player 12 (Brown) at (Position of MonsterSpawners[(Integer A)]) facing (Random real number between 0.00 and 360.00) degrees
      • Unit Group - Add all units of (Last created unit group) to MonsterGroups[(Integer A)]
      • -------- We could even play a special effect, here. --------
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
 

Rushhour

New Member
Reaction score
46
Sorry but throwing 6 triggers in here is somehow confusing. Could you explain what it should do, what doesn't work. Add some DebugMessages/Game-Display Text to (all Players) to check if a trigger is actually fired, takes the right units, and so on

Edit: One thing for the last trigger: It uses the Loop-Integer A, but I don't see a Loop 0o
 

AaronPwner

Member
Reaction score
0
Wow, I'm an idiot. The initializing trigger was never run, because there was no event. (It was normally supposed to be run by a "Run Trigger ()" action, but I removed it when I first created the map, as I didn't have the trigger yet!)
 

Rushhour

New Member
Reaction score
46
Yea and create a loop for the last trigger
Loop-For each integer from LoopA to <whatever> do
... (your actions here)
 
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