Picking up Locusts?

San-D

New Member
Reaction score
15
I have a little problem the following trigger is not working:

Code:
Begin
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Forst Gift 
    Actions
        Set Caster = (Casting unit)
        Destructible - Pick every destructible in (Region centered at (Position of (Casting unit)) with size (3500.00, 3500.00)) and do (Actions)
            Loop - Actions
                Set Destructable = (Picked destructible)
                Unit - Create 1 Forest Dummy for (Owner of (Casting unit)) at (Position of Destructable) facing Default building facing degrees
        Set Spirit270to90 = (Units within 4000.00 of (Position of Caster) matching (((Unit-type of (Matching unit)) Equal to Forest Dummy) and (((Angle from (Position of Caster) to (Position of (Matching unit))) Greater than 270.00) and ((Angle from (Position of Caster) to (Position of 
        Unit Group - Order Spirit270to90 to Move To (Position of Caster)

It creates the dummies, but it doesnt move those who are from 270 to 90 degrees of the caster!
 

Ghostwind

o________o
Reaction score
172
"Destructible" is a useless global that makes your spell non-MUI... why have it? Even if picked destructible leaks, think about it, you have one use of that in your trigger, so it doesn't minimize the leak at all, it just puts it in another unnecessary line of code.
 

San-D

New Member
Reaction score
15
um...wut?:confused:
my question is: is this line the problem:

Set Spirit270to90 = (Units within 4000.00 of (Position of Caster) matching (((Unit-type of (Matching unit)) Equal to Forest Dummy) and (((Angle from (Position of Caster) to (Position of (Matching unit))) Greater than 270.00) and ((Angle from (Position of Caster) to (Position of Matching unit) Lesser than 90.00))

because it doesnt move the units!
 

Ghostwind

o________o
Reaction score
172
Although this probably won't help you much, just to make the trigger more efficient, replace this:

Code:
Set Destructable = (Picked destructible)
Unit - Create 1 Forest Dummy for (Owner of (Casting unit)) at (Position of Destructable) facing Default building facing degrees

With this:

Code:
Unit - Create 1 Forest Dummy for (Owner of (Casting unit)) at (Position of (Picked destructible)) facing Default building facing degrees

Because it only leaks once, and makes your spell MUI.
MUIness > Removal of 1 leak.
 

Flare

Stops copies me!
Reaction score
662
MUIness > Leak removal.

No offense, but what kind of mad notion is this? You would rather be able to cast the spell multiple times than have horrific lag half-way through the game?

His trigger is MUI anyway. Assigning the destructible to a variable won't make a difference unless he adds a wait (THEN the MUI would be out the window). Assigning variables to units/destructibles/other non-leaky things in a wait-less trigger doesn't make it any less MUI...

And, there's alot more than 1 leak. It leaks once for EVERY destructible in that group. You have 400 destructibles, you have 400 leaks. You'll need to set the destructible's position to a variable, refer to that when spawning your dummy, then destroy the point all within the group. And the actions below the group leak as well (creating a unit group without a var, not referring to a point var when using points).

Ahm, can you post the rest of this?
Code:
(Angle from (Position of Caster) to (Position of

It's the second condition for the Spirit270to90 group. Also, instead of giving a group order, try "Pick every unit in unit group and do action: Order picked unit to move to (point)
 

San-D

New Member
Reaction score
15
Code:
Set Spirit270to90 = (Units within 4000.00 of (Position of Caster) matching (((Unit-type of (Matching unit)) Equal to Forest Dummy) and (((Angle from (Position of Caster) to (Position of (Matching unit))) Greater than 270.00) and ((Angle from (Position of Caster) to (Position of Matching unit) Lesser than 90.00))
 

San-D

New Member
Reaction score
15
What I meant to say and did not write down was that I think the problem is that the dummy is a Locust and maybe thats why it cant be picked up by "Pick every unit in unit group" function

SO CAN ANYONE TELL ME WHY THEY DONT MOVE (THE UNITS THAT ARE WITHIN THE RANGE OF 90->270 DEGREES OF CASTER)?
 

Ghostwind

o________o
Reaction score
172
No offense, but what kind of mad notion is this? You would rather be able to cast the spell multiple times than have horrific lag half-way through the game?

1 leak =! Lag.
Also, putting in a global doesn't remove that leak, it just moves it.

What I meant to say and did not write down was that I think the problem is that the dummy is a Locust and maybe thats why it cant be picked up by "Pick every unit in unit group" function

You should search for "Units of type (dummy)"
 

San-D

New Member
Reaction score
15
i understood what u said bu I just want to point out - Im not swapping destructables with dummies, I am creating dummies above trees(just gotta ad a destructable type comparison)
 

Ghostwind

o________o
Reaction score
172
Can't you just pick all of the destructibles (looks like you have that down already) and create 1 unit at its position facing the caster?

And there is no destructible group option. There might be in jass, though.
 

San-D

New Member
Reaction score
15
NO I CANT! The idea of the ability is to sort out those dummies, which are generaly to the unit's left, from those who are on the unit's right and make them do different things! If I use every destructable, there is no point!
 

Flare

Stops copies me!
Reaction score
662
Then do this within the Pick every Destructible loop, after creating the forest dummy

Code:
Add (Last Created Unit) to Spirit270to90

Then, you can just pick every unit in that group, check the angles between dummies position and casters position (not as a UG condition, but as an If/Then/Else within the UG loop). If the angles are correct, do what needs to be done within the Then part of the if/then/else
 

San-D

New Member
Reaction score
15
Listen, heres my code:

Code:
Begin
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Forst Gift 
    Actions
        Set Caster = (Casting unit)
        Destructible - Pick every destructible within 3500.00 of (Position of Caster) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Angle from (Position of Caster) to (Position of (Picked destructible))) Greater than or equal to 90.00
                        (Angle from (Position of Caster) to (Position of (Picked destructible))) Less than 270.00
                    Then - Actions
                    Else - Actions

how to continue so that i create dummies on the left and mark them Group1 and dummies on the right marked Group2? I cant make it any clearer!
I KNOW THERE ARE LEAKS, PLEASE GIVE THEM A REST FOR NOW!!!!
 

Flare

Stops copies me!
Reaction score
662
In your Then actions, create your unit and add it to (Group used for units on the left).

In your Else actions, create your unit and add it to (Group used for units on the right).

Your conditions look fine, and if units aren't between 90 and 270 degrees, they are on the caster's right side I believe.

And there's no need to use caps, we are only trying to help you get the trigger working as well as possible.
 

San-D

New Member
Reaction score
15
K

Code:
Begin
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Forst Gift 
    Actions
        Set Caster = (Casting unit)
        Destructible - Pick every destructible within 3500.00 of (Position of Caster) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Angle from (Position of Caster) to (Position of (Picked destructible))) Greater than or equal to 90.00
                        (Angle from (Position of Caster) to (Position of (Picked destructible))) Less than or equal to 270.00
                    Then - Actions
                        Unit - Create 1 Forest Dummy for Player 1 (Red) at (Position of (Matching destructible)) facing Default building facing degrees
                        Unit Group - Add (Last created unit) to Spirit90to270
                    Else - Actions
                        Unit - Create 1 Forest Dummy for Player 1 (Red) at (Position of (Matching destructible)) facing Default building facing degrees
                        Unit Group - Add (Last created unit) to Spirit270to90
        Unit Group - Pick every unit in Spirit90to270 and do (Unit Group - Order Spirit90to270 to Move To (Position of Caster))

Problem N3: It only moves the Dummies from 2nd quadrant (90->180), somehow it doesnt read the conditions right! I experimented with the values and changing left/right to up/down (90,270 to 0,180) and it doest work at all!
 
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

      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