[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
889
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
889
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
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top