[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
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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