Locust ability

Blink'd

New Member
Reaction score
0
The locust ability is fun and all, but it also makes things alot more complicated in the GUI. I don't know if the same problem also exists in JASS or anything else, but i am quite sure it does.

Now this is the scenario:
There is this building (Lets say its a Lumber mill) when you build it, it spawns a couple of units (peasants) wich automaticly gather wood for you. I dont want those units to be used for anything else except gathering wood so i gave them the ability locust.

Everything is working so far, except for this:
Once the Lumber mill dies the gathering peasants will still be there and they cant gather wood because the mill is destroyed. So the peasants must also die when the Lumber mill dies. But the Peasants won't respond to;( Pick every unit within Range of Lumber mill ) because they cannot be picked with the ability Locust on them. I haven't found any other solution on the problem then a solution with that triggerin part in it.

If anyone could find an alternative solution for this problem, or can fix the problem i have with the ( Pick every unit within Range of Lumber mill ) i would appreciate it.
 

Laiev

Hey Listen!!
Reaction score
188
and instead of locust, you can use unselect :p
so will work any other thing, except select of a player
 

Blink'd

New Member
Reaction score
0
Unselect is indeed to slow, because if the player is able to move the peasant for one second, they won't gather wood anymore, and the loop of actions will be broken.

@Nexor;

After a quick look trough the GUI i couldnt find the;

Pick every unit of unit-type Command
 

Blink'd

New Member
Reaction score
0
I found it. But now a new problem pops up.
This is what i had in the first trigger:

Trigger:
  • Spawn Kill Lumbermill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Lumber Mill
    • Actions
      • Unit Group - Pick every unit in (Units within 400.00 of (Position of (Dying unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Peasant
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
              • Do nothing


Now i must have something like this:

Trigger:
  • Spawn Kill Lumbermill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Lumber Mill
    • Actions
      • Unit Group - Pick every unit in (Units of type Peasant) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Within 400 of Lumber Mill
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
              • Do nothing


Aparently
(Unit-type of (Picked unit)) Equal to Within 400 of Lumber Mill
Does not exist.
 

Laiev

Hey Listen!!
Reaction score
188
Pick every unit in range MATCHING CONDITION... in matching condition you put "unit-type of matching unit equal to peasant....

also remove that Do Nothing
why?
because do nothing DO NOTHIGN! :nuts:
 

Nexor

...
Reaction score
74
You can set at the condition, to apply more conditions using the Boolean - And function. there you can set both conditions.
 

Laiev

Hey Listen!!
Reaction score
188
You can set at the condition, to apply more conditions using the Boolean - And function. there you can set both conditions.

he don't need it... that "And - all conditions are true" is just to do something like this:

Trigger:
  • .
    • if
      • Or
        • and
          • unit say hi
          • player say hi
      • or
        • and
          • unit say bye
          • player say bye
    • then
    • else


the 'default' condition part in warcraft is set to "all conditions NEED to be true or don't will run
 

Nexor

...
Reaction score
74
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Peasant) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between (Position of (Triggering unit)) and (Position of (Triggering unit))) Less than or equal to 400.00
            • Then - Actions
            • Else - Actions


Something like this, it leaks two points and one unitgroup though, you have to remove those.
 

HydraRancher

Truth begins in lies
Reaction score
197
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Peasant) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between (Position of (Triggering unit)) and (Position of (Picked unit))) Less than or equal to 400.00
            • Then - Actions
            • Else - Actions

Slight event response error, you want "Picked Unit" for the second one.
 

Blink'd

New Member
Reaction score
0
@Laiev: If you dont put "Do nothing" there, the game crashes when the picked unit is not a peasant.

@Nexor: And thanks for the sample of the action, that was the only thing missing to seal the deal.

Thanks you people :p
 

Laiev

Hey Listen!!
Reaction score
188
@Laiev: If you dont put "Do nothing" there, the game crashes when the picked unit is not a peasant.

@Nexor: And thanks for the sample of the action, that was the only thing missing to seal the deal.

Thanks you people :p

Do nothing is a stupid function which blizzard create just because have nothing more to do -.-'

Your WE is broken[2]
 

HydraRancher

Truth begins in lies
Reaction score
197
Wrong. If you use the singular/one line If/Then/Else, then you HAVE to fill all slots, which is why Do Nothing is there.
 

Laiev

Hey Listen!!
Reaction score
188
Wrong. If you use the singular/one line If/Then/Else, then you HAVE to fill all slots, which is why Do Nothing is there.

Not too right....

you can just put a custom script //comenthere just to warcraft don't read it
 

Blink'd

New Member
Reaction score
0
I was just doing a test map, so i wasn't really paying much attention to the little things, and adding a "Do Nothing" Action there was enough to fix it.
 

haxic

New Member
Reaction score
2
The locust ability is fun and all, but it also makes things alot more complicated in the GUI. I don't know if the same problem also exists in JASS or anything else, but i am quite sure it does.

Now this is the scenario:
There is this building (Lets say its a Lumber mill) when you build it, it spawns a couple of units (peasants) wich automaticly gather wood for you. I dont want those units to be used for anything else except gathering wood so i gave them the ability locust.

Everything is working so far, except for this:
Once the Lumber mill dies the gathering peasants will still be there and they cant gather wood because the mill is destroyed. So the peasants must also die when the Lumber mill dies. But the Peasants won't respond to;( Pick every unit within Range of Lumber mill ) because they cannot be picked with the ability Locust on them. I haven't found any other solution on the problem then a solution with that triggerin part in it.

If anyone could find an alternative solution for this problem, or can fix the problem i have with the ( Pick every unit within Range of Lumber mill ) i would appreciate it.

havn't read all comments but whenever i create units with locust ability i put them into a unit group.... when i want them removed i removed them through the unit group.

Etc; make an UnitGroup Array, and "register" every Lumber Mill to a designated Array slot. When you create a Lumber Mill, save all created "Locust Peseants" to that Lumber Mill's Array slot.

When a Lumber Mill dies, pick all units in the UnitGroup Slot for that Lumber Mill and kill all units.

edit// Not sure how you spawn those Peseants, but to put them in the unit group I think you have to use "last created unit" for "Locust" using units.
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top