Region / pathing Problems

I

ilida76

Guest
RED = Variable
GREEN = Custom Script

Code:
Region Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set [COLOR="Red"]regionArray[10][/COLOR] = Mob Spawn 1 <gen>
        Set [COLOR="red"]regionArray[11][/COLOR] = Spawn 1 A <gen>
        Set [COLOR="red"]regionArray[12][/COLOR] = Spawn 1 B <gen>
        Set [COLOR="red"]regionArray[13][/COLOR] = Spawn 1 C <gen>
        Set [COLOR="red"]regionArray[14][/COLOR] = Spawn 1 D <gen>
        Set [COLOR="red"]regionArray[15][/COLOR] = Spawn 1 Ending <gen>
        Set [COLOR="red"]regionArray[20][/COLOR] = Mob Spawn 2 <gen>
        Set [COLOR="red"]regionArray[21][/COLOR] = Spawn 2 A <gen>
        Set [COLOR="Red"]regionArray[22][/COLOR] = Spawn 2 B <gen>
        Set [COLOR="red"]regionArray[23][/COLOR] = Spawn 2 C <gen>
        Set [COLOR="red"]regionArray[24][/COLOR] = Spawn 2 D <gen>
        Set [COLOR="red"]regionArray[25][/COLOR] = Spawn 2 Ending <gen>
        Set [COLOR="red"]regionArray[30][/COLOR] = Mob Spawn 3 <gen>
        Set [COLOR="red"]regionArray[31][/COLOR] = Spawn 3 A <gen>
        Set [COLOR="red"]regionArray[32][/COLOR] = Spawn 3 B <gen>
        Set [COLOR="red"]regionArray[33][/COLOR] = Spawn 3 C <gen>
        Set [COLOR="red"]regionArray[34[/COLOR]] = Spawn 3 D <gen>
        Set [COLOR="red"]regionArray[35][/COLOR] = Spawn 3 Ending <gen>
        Set [COLOR="red"]regionArray[40][/COLOR] = Mob Spawn 4 <gen>
        Set [COLOR="red"]regionArray[41][/COLOR] = Spawn 4 A <gen>
        Set [COLOR="red"]regionArray[42][/COLOR] = Spawn 4 B <gen>
        Set [COLOR="red"]regionArray[43][/COLOR] = Spawn 4 C <gen>
        Set [COLOR="red"]regionArray[44][/COLOR] = Spawn 4 D <gen>
        Set [COLOR="red"]regionArray[45][/COLOR] = Spawn 4 Ending <gen>
        Set [COLOR="red"]regionArray[50][/COLOR] = Mob Spawn 5 <gen>
        Set [COLOR="red"]regionArray[51][/COLOR] = Spawn 5 A <gen>
        Set [COLOR="red"]regionArray[52][/COLOR] = Spawn 5 B <gen>
        Set [COLOR="red"]regionArray[53][/COLOR] = Spawn 5 C <gen>
        Set [COLOR="red"]regionArray[54][/COLOR] = Spawn 5 D <gen>
        Set [COLOR="red"]regionArray[55][/COLOR] = Spawn 5 Ending <gen>
        Set [COLOR="red"]regionArray[60][/COLOR] = Mob Spawn 6 <gen>
        Set [COLOR="red"]regionArray[61][/COLOR] = Spawn 6 A <gen>
        Set [COLOR="red"]regionArray[62][/COLOR] = Spawn 6 B <gen>
        Set [COLOR="red"]regionArray[63][/COLOR] = Spawn 6 C <gen>
        Set [COLOR="red"]regionArray[64][/COLOR] = Spawn 6 D <gen>
        Set [COLOR="red"]regionArray[65][/COLOR] = Spawn 6 Ending <gen>
        Set [COLOR="red"]regionArray[70][/COLOR] = Mob Spawn 7 <gen>
        Set [COLOR="red"]regionArray[71][/COLOR] = Spawn 7 A <gen>
        Set [COLOR="red"]regionArray[72][/COLOR] = Spawn 7 B <gen>
        Set [COLOR="red"]regionArray[73][/COLOR] = Spawn 7 C <gen>
        Set [COLOR="red"]regionArray[74][/COLOR] = Spawn 7 D <gen>
        Set [COLOR="red"]regionArray[75][/COLOR] = Spawn 7 Ending <gen>
        Set [COLOR="red"]regionArray[80][/COLOR] = Mob Spawn 8 <gen>
        Set [COLOR="red"]regionArray[81][/COLOR] = Spawn 8 A <gen>
        Set [COLOR="red"]regionArray[82][/COLOR] = Spawn 8 B <gen>
        Set [COLOR="red"]regionArray[83][/COLOR] = Spawn 8 C <gen>
        Set [COLOR="red"]regionArray[84][/COLOR] = Spawn 8 D <gen>
        Set [COLOR="red"]regionArray[85][/COLOR] = Spawn 8 Ending <gen>

Changed up the Region Array's to make them more simple (the numbers)

Code:
Region Spawn Path
    Events
        Unit - A unit enters Mob Spawn 1 <gen>
        Unit - A unit enters Spawn 1 A <gen>
        Unit - A unit enters Spawn 1 B <gen>
        Unit - A unit enters Spawn 1 C <gen>
        Unit - A unit enters Spawn 1 D <gen>
        Unit - A unit enters Spawn 1 Ending <gen>
        Unit - A unit enters Mob Spawn 2 <gen>
        Unit - A unit enters Spawn 2 A <gen>
        Unit - A unit enters Spawn 2 B <gen>
        Unit - A unit enters Spawn 2 C <gen>
        Unit - A unit enters Spawn 2 D <gen>
        Unit - A unit enters Spawn 2 Ending <gen>
        Unit - A unit enters Mob Spawn 3 <gen>
        Unit - A unit enters Spawn 3 A <gen>
        Unit - A unit enters Spawn 3 B <gen>
        Unit - A unit enters Spawn 3 C <gen>
        Unit - A unit enters Spawn 3 D <gen>
        Unit - A unit enters Spawn 3 Ending <gen>
        Unit - A unit enters Mob Spawn 4 <gen>
        Unit - A unit enters Spawn 4 A <gen>
        Unit - A unit enters Spawn 4 B <gen>
        Unit - A unit enters Spawn 4 C <gen>
        Unit - A unit enters Spawn 4 D <gen>
        Unit - A unit enters Spawn 4 Ending <gen>
        Unit - A unit enters Mob Spawn 5 <gen>
        Unit - A unit enters Spawn 5 A <gen>
        Unit - A unit enters Spawn 5 B <gen>
        Unit - A unit enters Spawn 5 C <gen>
        Unit - A unit enters Spawn 5 D <gen>
        Unit - A unit enters Spawn 5 Ending <gen>
        Unit - A unit enters Mob Spawn 6 <gen>
        Unit - A unit enters Spawn 6 A <gen>
        Unit - A unit enters Spawn 6 B <gen>
        Unit - A unit enters Spawn 6 C <gen>
        Unit - A unit enters Spawn 6 D <gen>
        Unit - A unit enters Spawn 6 Ending <gen>
        Unit - A unit enters Mob Spawn 7 <gen>
        Unit - A unit enters Spawn 7 A <gen>
        Unit - A unit enters Spawn 7 B <gen>
        Unit - A unit enters Spawn 7 C <gen>
        Unit - A unit enters Spawn 7 D <gen>
        Unit - A unit enters Spawn 7 Ending <gen>
        Unit - A unit enters Mob Spawn 8 <gen>
        Unit - A unit enters Spawn 8 A <gen>
        Unit - A unit enters Spawn 8 B <gen>
        Unit - A unit enters Spawn 8 C <gen>
        Unit - A unit enters Spawn 8 D <gen>
        Unit - A unit enters Spawn 8 Ending <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to [COLOR="red"]hostileCreeps[/COLOR]
    Actions
        Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)
        Set [COLOR="red"]tmpPoint[/COLOR] = (Center of [COLOR="red"]regionArray[/COLOR][(Custom value of (Triggering unit))])
        Unit - Order (Triggering unit) to Move To [COLOR="Red"]tmpPoint[/COLOR]
        [COLOR="SeaGreen"]Custom script: call RemoveLocation( udg_tmpPoint )[/COLOR]


Alright, pretty much here, I have 8 spawns (8 seperate regions) from the middle, and they have pathing points to go outwards toward the sides of the map (the Ending Regions (where you lose lives)) and there are A, B, C, and D regions between these 2 region points to keep them on the pathing.

My units all spawn from the 8 seperate regions, BUT, when they do, they only follow the path that was given to them in the Spawn 1 --> 1A --> 1B --> 1C --> 1D --> 1Ending, (all 8 spawn points),

the problem is that the spawns 2-8 are not following their own paths (Spawn 2 --> 2A --> 2B --> 2C --> 2D --> 2Ending (same w/ the other spawns 3-8))

any one understand why? possbily I should copy some of my variables? and set them differently?.

my guess is that it is somewhere in the Actions part in the Trigger 2, with the custom values, but im not sure how I'd fix it.

WHAT I WANT

WHAT I GET

Thanks in advance
 

GooS

Azrael
Reaction score
154
Well first of all I would just like to say, DAMN most events I've seen in my life.


Secondly, Why shouldn't they to the same point? I see nothing that prevents it or changes the point to which they should move.

Code:
Unit - Set the custom value of (Triggering unit) to ((Custom value of (Triggering unit)) + 1)

Probably always sets the custom value to 1

Code:
Set tmpPoint = (Center of regionArray[(Custom value of (Triggering unit))])

Hence all units will move to regionArray[1], being Spawn 1 A <gen>

This is atleast what I can see, I might be wrong but as the triggering units custom value does not increase as you want it to do. Theres always a new triggering unit without a custom value so it always equals 1
 
I

ilida76

Guest
ahh i see, any idea on how to fix it? lol. im gonna mess around w/ it n see what i can do, but if neone knows exactly, please tell :)
 

GooS

Azrael
Reaction score
154
Sry beats me with this kind of system.

Some sort of integer increment would be the first thought but that would probably freak after the first order.

Example:
Code:
Unit - Set the custom value of (Triggering unit) to ((NewMob) + 1)
Set NewMob = ((NewMob) + 1)

But I can't really think this through at the moment, my mind is in blur ;)
 
I

ilida76

Guest
btw, what u said was correct, i changed some things to test it, and ya, thats the frekin problem lol.
 
I

ilida76

Guest
bah, i cant get it to work, been messin w/ it for an hr or so now.... anyone know how to fix this crap?..
 

Somatic

You can change this now in User CP.
Reaction score
84
Custom Value on unit stays with the unit throught out until its removed from the unit. In actual fact there might not be much flaw i can point out here.

Try this instead. Use a seperate trigger to assign the custom value of the unit where the unit spawn. Like :
Code:
Event : A Unit has entered the Map
Condition : Owner of triggering unit is equal to hostile creep
Action : Loop Integer from 10 to 85 
              If
                 Triggering unit is in RegionArray[Integer] is equal to true
              then
                  Set triggering unit's custom value to [Integer]

Something like this will ensure that unit which just entered the map will be assigned the correct custom Value.

To test out your system. Just add 1 more line to your 2nd trigger you posted

Code:
Game - Display to All Players : [Triggering Unit] has entered RegionArray[Value] with Custom Value of [Triggering Unit]
 
I

ilida76

Guest
this right? and with this, i just add it, right? keeping all of the other things the same.

Code:
Untitled Trigger 001
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Owner of (Triggering unit)) Equal to hostileCreeps
    Actions
        For each (Integer A) from 10 to 85, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) is in (Units in regionArray[10])) Equal to True
                    Then - Actions
                        Unit - Set the custom value of (Triggering unit) to 10
                    Else - Actions
 

Somatic

You can change this now in User CP.
Reaction score
84
Change this part

Code:
For each (Integer A) from 10 to 85, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Triggering unit) is in (Units in regionArray[[B]Integer A[/B]])) Equal to True
                    Then - Actions
                        Unit - Set the custom value of (Triggering unit) to [B]Integer A[/B]
                    Else - Actions
 
I

ilida76

Guest
woooooot it worked, but some reason only 2 mobs spawn rofl.. atm seein what it the problem might be, thanks a lot Somatic +rep to you lol:D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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