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.

      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