System Mass Movement System

KvickaN

TH.net Regular
Reaction score
24
Lol, I just had to post here as I also made a Mass Movement System but in GUI and customized for my map.

Funny thing is I used the exact same name as you and I hadn't even seen this topic :)

But well It's quite obvious to use "Mass Movement System" as a name hehe.

Nice job!

Oh and if you want I can post mine, allthough It's not as advanced as yours.
 

KvickaN

TH.net Regular
Reaction score
24
Allright :) Probably leaking but I havent read the leak tutor yet... Hehe.

Code:
MoveTo Red
    Events
        Unit - A unit enters Move Red <gen>
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Entering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit Group - Pick every unit in (Units in Map Area <gen> owned by (Player((Integer A)))) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Red spawn <gen>))
                        Unit - Move (Entering unit) instantly to (Random point in MOVE REGION <gen>)
                        Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( Moves  + ((String((Number of living SheepColors[(Integer A)] units owned by (Player((Integer A)))))) +  Sheeps to |cFFC00000Top left|r!)))
                        Sound - Play MoveToLocation <gen>
                    Else - Actions

Code:
MoveTo Blue
    Events
        Unit - A unit enters Move Blue <gen>
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Entering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit Group - Pick every unit in (Units in Map Area <gen> owned by (Player((Integer A)))) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Blue spawn <gen>))
                        Unit - Move (Entering unit) instantly to (Random point in MOVE REGION <gen>)
                        Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( Moves  + ((String((Number of living SheepColors[(Integer A)] units owned by (Player((Integer A)))))) +  Sheeps to |cFF0064FFTop right|r!)))
                        Sound - Play MoveToLocation <gen>
                    Else - Actions

Code:
MoveTo Teal
    Events
        Unit - A unit enters Move Teal <gen>
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Entering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit Group - Pick every unit in (Units in Map Area <gen> owned by (Player((Integer A)))) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Teal spawn <gen>))
                        Unit - Move (Entering unit) instantly to (Random point in MOVE REGION <gen>)
                        Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( Moves  + ((String((Number of living SheepColors[(Integer A)] units owned by (Player((Integer A)))))) +  Sheeps to |cFF00FFFFBottom left|r!)))
                        Sound - Play MoveToLocation <gen>
                    Else - Actions

Code:
MoveTo Purple
    Events
        Unit - A unit enters Move Purple <gen>
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Entering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit Group - Pick every unit in (Units in Map Area <gen> owned by (Player((Integer A)))) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Purple spawn <gen>))
                        Unit - Move (Entering unit) instantly to (Random point in MOVE REGION <gen>)
                        Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( Moves  + ((String((Number of living SheepColors[(Integer A)] units owned by (Player((Integer A)))))) +  Sheeps to |cFF800080Bottom right|r!)))
                        Sound - Play MoveToLocation <gen>
                    Else - Actions

Code:
MoveTo Center
    Events
        Unit - A unit enters Move Center <gen>
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Entering unit)) Equal to (Player((Integer A)))
                    Then - Actions
                        Unit Group - Pick every unit in (Units in Map Area <gen> owned by (Player((Integer A)))) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Center <gen>))
                        Unit - Move (Entering unit) instantly to (Random point in MOVE REGION <gen>)
                        Game - Display to (All players) the text: ((Name of (Player((Integer A)))) + ( Moves  + ((String((Number of living SheepColors[(Integer A)] units owned by (Player((Integer A)))))) +  Sheeps to the |cFFFFFFC0Center|r!)))
                        Sound - Play MoveToLocation <gen>
                    Else - Actions

Probably possible to make it into 1 trigger too... :) But this is working, allthough when everyone has like 100 sheeps and uses this at the same time it gets abit laggy.
 
K

Ketchup Lad

Guest
This is really smooth. Works flawlessly

Only problem I had was that units would just stop moving after a certain amount of time, before they reached the point I wanted them to go to. I don't think it's lag because I was only commanding 50 units, and they were all moving fine until then.

Anybody else experiencing this?

Also, maybe add in a feature that stops unit movement, it's pretty hard to stop 100 units when they're all moving.
 

Doomhammer

Bob Kotick - Gamers' corporate spoilsport No. 1
Reaction score
67
This is really smooth. Works flawlessly

Only problem I had was that units would just stop moving after a certain amount of time, before they reached the point I wanted them to go to. I don't think it's lag because I was only commanding 50 units, and they were all moving fine until then.

Anybody else experiencing this?

Lag "feels" different, i.e. the untis' movement becomes jerky. What you mention here is due to the geometry used: the units stop a good distance before reaching their destination point. The larger the distance, the larger the difference to the destination point. But people got used to it quickly, so you can sort of "overstear", i.e. order the masses a tiny bit further than they're supposed to walk. Otherwise have a play with the geometric function calls at the end of the script

Also, maybe add in a feature that stops unit movement, it's pretty hard to stop 100 units when they're all moving.

for order use the string "stop" and your units stop. It's given as an example in the map readme.

JASS:
function MassMoveType takes integer Id1, integer Id2, string order, real x, real y, player p, real t returns nothin
g
 

quraji

zap
Reaction score
144
I tried it and here are my two cents.

I'd like to note that I'm an extremist, so I spawned tons of units, and the system performed similarly to how it performed with a much smaller amount of units, which is good I'd say :p

But, I have a couple problems.

It seems that while the units are being ordered, they can not receive new orders (only happens with a larger amount of units).

Also, when units are ordered to move to a point that is around a wall or something, some of them would proceed around it like you would expect, but some head straight to it and stop. This could cause problems.
Screenshot:
mmsssle9.jpg

But nevertheless, a decent system. Good job.
 

Doomhammer

Bob Kotick - Gamers' corporate spoilsport No. 1
Reaction score
67
I tried it and here are my two cents.

But, I have a couple problems.

It seems that while the units are being ordered, they can not receive new orders (only happens with a larger amount of units).

Also, when units are ordered to move to a point that is around a wall or something, some of them would proceed around it like you would expect, but some head straight to it and stop. This could cause problems.

But nevertheless, a decent system. Good job.

There are limits to anything, especially in Wc3, which is not made to process masses of units (rather than a bunch of heroes and their sidekicks). At some point you are going to see those "movement lags", i.e. the fact that you cannot control units while they're moving along. Without the system this may start when moving 80-100 units simultaneously, with the system it's easily the double to treble amount, but then we're back at the point to realize that Wc3 is not made to process masses of units. Obstacles are another issue. The system clusters the individual units to unit groups, and orders the groups along. If, along with the whole movement calculation, the unit groups appear to lose their 'intelligence' and bump into the obstacle instead of moving around it, then it's not really the fault of my system rather than the underlying movement engine made by Blozzard.
 

Arnair

New Member
Reaction score
0
I've done it!

But, how can I move the 11 player units instead of the 1 player units?

(I don't understand the line where says player p, I don't know what I must change)

Thanks
 
R

Remscarz

Guest
Awesome ness level

The remscar says what awesome level? OVER 9000!!!! OVER 9000!!! 9000!!!!111oneone1!!!11one
Wow dude
This liek
DOMINATES
If this was Dota tehn it would be saysing GOD LIKE all over teh screen with your name. God bless you! You ARE SMART!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

And also
The game im making orders hundreds of zombies around the map.... Is there a way to make this trigger without a spell being cast? And i want the zombies to go to the location of a unit not a random location.
 
R

Remscarz

Guest
Edit: This system fails, I use it on 200 units owned by nuetral hostile and the game laggs like there is no tommmorow.
 

Ark'u'roth

New Member
Reaction score
0
Hey, I'm experiencing a weird bug. When I have two groups with different unit types in each one, the units will execute the move but then the entire warcraft program shuts down when they finish. Any ideas?

Ark'u'roth
 

Ark'u'roth

New Member
Reaction score
0
I've refined more information on my predicament. I've narrowed the bug down to only one of the groups (of about 300) using this system. The program shuts down if the other group, about 700 units, mobilizes regardless of whether it uses the mass movement system. The bug does not occur of this larger group does not move at all, or if roles are reversed. But I can't find any difference between the two other than unit type.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top