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.
  • 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

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top