[Yet another problem] Spawning In Region

D

Deso

Guest
Code:
Spawn Level 1 Creeps
    Events
    Conditions
    Actions
        Set Round = (Round + 1)
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Unit - Create Round (Unit-type of (Random unit from Level1Units)) for Neutral Hostile at (Center of SpawnRegions[(Integer A)]) facing 0.00 degrees

Round is an Integer variable that I increase every level which in turn increases amout of units spawned. Level1Units is a unit-group.

Can anyone tell my why this trigger does nothing

Edit: Spawn regions is a twelve-count region array.
 
D

Deso

Guest
I wasn't aware you could debug, but here are all related triggers.

Code:
Move To Arenas
    Events
        Time - NormalBreakTimer expires
    Conditions
    Actions
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Set HeroesGroup = (Units owned by Players[(Integer A)] matching (((Matching unit) is A Hero) Equal to True))
                Unit Group - Pick every unit in HeroesGroup and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to (Center of EnterRegions[(Integer A)])
                        Camera - Pan camera for Players[(Integer A)] to (Center of EnterRegions[(Integer A)]) over 0.00 seconds
        Wait 2.00 seconds
        Trigger - Run Spawn Level 1 Creeps <gen> (checking conditions)

Code:
Level Units
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Centaur Archer) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Draenei Guardian) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Bandit) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Corrupted Treant) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Barbed Arachnathid) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Blue Dragonspawn Meddler) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Spider Crab Shorecrawler) and do (Unit Group - Add (Picked unit) to Level1Units)
        Unit Group - Pick every unit in (Units of type Ice Troll) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Brigand) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Warrior Arachnathid) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Gnoll Brute) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Reef Elemental) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Mur'gul Blood-Gill) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Skeletal Orc) and do (Unit Group - Add (Picked unit) to Level2Units)
        Unit Group - Pick every unit in (Units of type Voidwalker) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Assassin) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Salamander Hatchling) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Magnataur Warrior) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Tuskarr Spearman) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Elder Wendigo) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Skeletal Marksman) and do (Unit Group - Add (Picked unit) to Level3Units)
        Unit Group - Pick every unit in (Units of type Wendigo Shaman) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Centaur Sorcerer) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Draenei Seer) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Maiden of Pain) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Gnoll Overseer) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Elder Hydra) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Elder Jungle Stalker) and do (Unit Group - Add (Picked unit) to Level4Units)
        Unit Group - Pick every unit in (Units of type Centaur Khan) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Elder Voidwalker) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Doom Guard) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Bandit Lord) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Granite Golem) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Siege Golem) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Faceless One Deathbringer) and do (Unit Group - Add (Picked unit) to Level5Units)
        Unit Group - Pick every unit in (Units of type Enraged Jungle Stalker) and do (Unit Group - Add (Picked unit) to Level5Units)

Code:
 Spawn Regions
    Events
        Map initialization
    Conditions
    Actions
        Set SpawnRegions[1] = Player One Spawn <gen>
        Set SpawnRegions[2] = Player Two Spawn <gen>
        Set SpawnRegions[3] = Player Three Spawn <gen>
        Set SpawnRegions[4] = Player Four Spawn <gen>
        Set SpawnRegions[5] = Player Five Spawn <gen>
        Set SpawnRegions[6] = Player Six Spawn <gen>
        Set SpawnRegions[7] = Player Seven Spawn <gen>
        Set SpawnRegions[8] = Player Eight Spawn <gen>
        Set SpawnRegions[9] = Player Nine Spawn <gen>
        Set SpawnRegions[10] = Player Ten Spawn <gen>
        Set SpawnRegions[11] = Player Eleven Spawn <gen>
        Set SpawnRegions[12] = Player Twelve Spawn <gen>

Sorry for the slow response time, I got caught up eating. :D
 

Tinki3

Special Member
Reaction score
418
>Trigger - Run Spawn Level 1 Creeps <gen> (checking conditions)

Try running the trigger with 'Ignore Conditions'.

As for the event of that action's trigger, does the timer even expire?
Or should I say, does that trigger even run at all?
 
D

Deso

Guest
I'll try it, and yes, it does.

Code:
NormalBreakTimer
    Events
    Conditions
    Actions
        Countdown Timer - Create a timer window for NormalBreakTimer with title Break Time
        Set NormalBreakTimerWindow = (Last created timer window)
        Countdown Timer - Show NormalBreakTimerWindow
        Countdown Timer - Start NormalBreakTimer as a One-shot timer that will expire in 60.00 seconds

Edit:
Adding ignore condition didn't help.

Edit 2:
It must be the way I setup the unit group, because when I just use one unit, it works fine. Any idea what I did wrong with the unit group?
 
D

Deso

Guest
I actually already tried that. I had another post up.. but I've no clue where it went -- I've come to the conclusion that it's my unit-groups because when I just add a specific unit it works. Any ideas on why my unit groups wouldn't be working?

When I do this:
Code:
Spawn Level 1 Creeps
    Events
        Time - NormalBreakTimer expires
    Conditions
    Actions
        Set Round = (Round + 1)
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Unit - Create Round Bandit for Neutral Hostile at (Center of SpawnRegions[(Integer A)]) facing 0.00 degrees

It works.

Edit ----
Also I noticed that a bandit spawns in regions belonging to players who are not playing, how do I correct this?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Not to sound offensive or anything, but this is ridiculous. Why do you need a unit group? You're trying to store certain unit-types, right? Then why don't you use some unit-type variables, perhaps arrays? That way, you don't need to depend on what units are already on the map in order to create them.
 
D

Deso

Guest
Erf.. I feel ridiculous, don't worry - it is. :) I am new at this! Anyway, I use unit-type arrays for bosses, I just didn't know I could use them as a reference to create multiple, random units from it. Also, as for the double post, I assumed this one was ignored because the subject was changed. :banghead:

Sorry, I'm not the most common-sense-endowed person around. I'll try the array and see what I can come up with trigger-wise. I have a feeling it won't work. Also.. while I'm thinking about it again.
Also I noticed that a bandit spawns in regions belonging to players who are not playing, how do I correct this?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
888
Ok. Here's what you should do. Create one Unit-Type Array variable for each level. Store your units for that level into it. Then do this to create a random unit from the variable:

Code:
Unit - Create 1 UnitTypeVariable[(Random integer number between 1 and 5)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees

See the random integer? That picks a random unit from the array.
 
D

Deso

Guest
Great, thanks - Sorry for the slow response, cooking and cleaning whilest I try to figure this one out - Is there any way to incorperate my 12 player array while still checking if the player is there, so I don't need twelve triggers?
 
D

Deso

Guest
You guys really are a god-send for us 'noobs' :) Thanks, so much.

Edit: Even if I do feel stupid.. and burnt my food. :D
 
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