Need Massing Help

AEK

New Member
Reaction score
0
Ok i has some help creating a massing trigger yesterday. It worked by a certain spell being cast (in this case "Mass Middle") which causes all units excluding heroes and wisps to the mass point. Here is the trigger:

Code:
Massing Mid
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mass Middle 
    Actions
        Set Mass_tmp_group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Not equal to Base Wisp) and ((((Matching unit) is A Hero) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
        Set Mass_tmp_point = (Center of Mid <gen>)
        Unit Group - Pick every unit in Mass_tmp_group and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Attack-Move To Mass_tmp_point
        Custom script:   call DestroyGroup (udg_Mass_tmp_group)
        Custom script:   call RemoveLocation (udg_Mass_tmp_point)

I also made separate triggers to move to a different area (in this case the bottom base, or blues base), using the same trigger with the point variable being changed to blues base, and requiring a different spell being cast (Mass Blue). Here is the code:

Code:
Massing Blue
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mass Blue 
    Actions
        Set Mass_tmp_group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Not equal to Base Wisp) and ((((Matching unit) is A Hero) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
        Set Mass_tmp_point = (Center of Blue Base <gen>)
        Unit Group - Pick every unit in Mass_tmp_group and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Attack-Move To Mass_tmp_point
        Custom script:   call DestroyGroup (udg_Mass_tmp_group)
        Custom script:   call RemoveLocation (udg_Mass_tmp_point)

For some reason, since i added the triggers to mass blue's base (and the triggers for the other bases), all of the massing triggers send units to blues base, instead of sending units to the base/region i want them to.

Can anyone see why this is happening? I've gone through the code multiple times and i cannot see why this occurs.

Thanks in advance, AEK.
 

AEK

New Member
Reaction score
0
Is it because they are based off the same ability? Or is the problem in the trigger?
 

Sil3nt

SUP?
Reaction score
134
u agen!... anyways

If a unit has mroe than 2 abilities based on the same original ability eg. If u had 2 skills based off warstmp, it will cause conflicts because they have the same order string. I dont think ders anyway around this, u just have to base it off another ability. BTW a centaurs warstomp and a tauren chieftans warstomp are still the same and wont work ... im not sure about this but yeh .. u can try if u want
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Oh theres no command neutral-centaur warstomp
means its only one your right

Just use dummies more easier
 

AEK

New Member
Reaction score
0
lol sil3nt, cheers for the help yet again :p i was just sorting out these bloody leaks in my base spawning trigger lol which helps me learn variables i guess so its ok! But it gives me another question: If you use a variable 4 times in one trigger (like using then destroying, then using again for a different player and location then destroying that again)? i'll put the trigger in if it helps :p

Yes im useless with this stuff :p

Code:
Burrow Creation
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 1 (Red) controller) Equal to User
                        (Player 1 (Red) slot status) Equal to Is playing
                    Then - Actions
                        Set Burrow_tmp_point = (Center of Red Base <gen>)
                        Unit - Create 1 Burrow Tier 1 for Player 1 (Red) at Burrow_tmp_point facing Default building facing degrees
                        Custom script:   Call RemoveLocation(udg_Burrow_tmp_point)
                    Else - Actions
                        Do nothing
        Player Group - Pick every player in Player Group - Player 2 (Blue) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 2 (Blue) controller) Equal to User
                        (Player 2 (Blue) slot status) Equal to Is playing
                    Then - Actions
                        Set Burrow_tmp_point = (Center of Blue Base <gen>)
                        Unit - Create 1 Burrow Tier 1 for Player 2 (Blue) at Burrow_tmp_point facing Default building facing degrees
                        Custom script:   Call RemoveLocation(udg_Burrow_tmp_point)
                    Else - Actions
                        Do nothing
        Player Group - Pick every player in Player Group - Player 3 (Teal) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 3 (Teal) controller) Equal to User
                        (Player 3 (Teal) slot status) Equal to Is playing
                    Then - Actions
                        Set Burrow_tmp_point = (Center of Teal Base <gen>)
                        Unit - Create 1 Burrow Tier 1 for Player 3 (Teal) at Burrow_tmp_point facing Default building facing degrees
                        Custom script:   Call RemoveLocation(udg_Burrow_tmp_point)
                    Else - Actions
                        Do nothing
        Player Group - Pick every player in Player Group - Player 4 (Purple) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 4 (Purple) controller) Equal to User
                        (Player 4 (Purple) slot status) Equal to Is playing
                    Then - Actions
                        Set Burrow_tmp_point = (Center of Purple Base <gen>)
                        Unit - Create 1 Burrow Tier 1 for Player 4 (Purple) at Burrow_tmp_point facing Default building facing degrees
                        Custom script:   Call RemoveLocation(udg_Burrow_tmp_point)
                    Else - Actions
                        Do nothing
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Umm... You didn't ask a question, lol.

And you don't need to use the player group part, just drag the If Then Else out of the player groups (for everyone) and delete all the player group non sense :p.
 

Sil3nt

SUP?
Reaction score
134
umm so wahts the question ..? anyways i think u should destroy the variable(location) outside the loop eg -

Code:
Burrow Creation
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 1 (Red) controller) Equal to User
                        (Player 1 (Red) slot status) Equal to Is playing
                    Then - Actions
                        Set Burrow_tmp_point = (Center of Red Base <gen>)
                        Unit - Create 1 Burrow Tier 1 for Player 1 (Red) at Burrow_tmp_point facing Default building facing degrees
                   Else - Actions
                        Do nothing
   Custom script:   Call RemoveLocation(udg_Burrow_tmp_point)
        Player Group - Pick every player in Player Group - Player 2 (Blue) and do (Actions)
            Loop - Actions
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Oh and your syntax is wrong, it's "call" not "Call" :p case sensitive.
 

Sil3nt

SUP?
Reaction score
134
Umm... You didn't ask a question, lol.

And you don't need to use the player group part, just drag the If Then Else out of the player groups (for everyone) and delete all the player group non sense :p.

oh yeh thats true.

and does it matter if its Call or call ?
 

AEK

New Member
Reaction score
0
The question was: Can i use the same variable and destroy it 4 times in one trigger, or will it cause problems?

Thanks for the help and i will change the code.

I just saved my map then it came up with an error about that trigger because of the variables, i think.

Edit: So did i get it right? Heres the edited code:
Code:
Burrow Creation
    Events
        Map initialization
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) controller) Equal to User
                (Player 1 (Red) slot status) Equal to Is playing
            Then - Actions
                Set Burrow_tmp_point = (Center of Red Base <gen>)
                Unit - Create 1 Burrow Tier 1 for Player 1 (Red) at Burrow_tmp_point facing Default building facing degrees
            Else - Actions
                Do nothing
        Custom script:   call RemoveLocation(udg_Burrow_tmp_point)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 2 (Blue) controller) Equal to User
                (Player 2 (Blue) slot status) Equal to Is playing
            Then - Actions
                Set Burrow_tmp_point = (Center of Blue Base <gen>)
                Unit - Create 1 Burrow Tier 1 for Player 2 (Blue) at Burrow_tmp_point facing Default building facing degrees
            Else - Actions
                Do nothing
        Custom script:   call RemoveLocation(udg_Burrow_tmp_point)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 3 (Teal) controller) Equal to User
                (Player 3 (Teal) slot status) Equal to Is playing
            Then - Actions
                Set Burrow_tmp_point = (Center of Teal Base <gen>)
                Unit - Create 1 Burrow Tier 1 for Player 3 (Teal) at Burrow_tmp_point facing Default building facing degrees
            Else - Actions
                Do nothing
        Custom script:   call RemoveLocation(udg_Burrow_tmp_point)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 4 (Purple) controller) Equal to User
                (Player 4 (Purple) slot status) Equal to Is playing
            Then - Actions
                Set Burrow_tmp_point = (Center of Purple Base <gen>)
                Unit - Create 1 Burrow Tier 1 for Player 4 (Purple) at Burrow_tmp_point facing Default building facing degrees
            Else - Actions
                Do nothing
        Custom script:   call RemoveLocation(udg_Burrow_tmp_point)

Edit 2: Thank you all, the masser is working now :-D and the second trigger i needed help with is working now, also! You will recieve credit when i finish this game. Also +rep.
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Yeah but to be honest, I think it's better if you leave the call RemoveLocation in the If Then Else otherwise you're going to be calling the function even when it's not nescersary (if a player isn't in the game).
 

AEK

New Member
Reaction score
0
Ok i'll put it in the if/then/else. Does that do anything like lower map size or save memory or anything?
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Nope lol, it's just, if you had it the way it was and player 1 wasn't there it would try to null an already nulled variable, I don't know if this is errorcal (made up word) or not but there's no point in doing it, you see?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top